Commit 1f7527b
fix(integ-testing): add test that forces cdk-assets to use the Docker credentials helper (#663)
This runs `docker-credential-cdk-asset` (the Docker helper tool) and
checks its output to see that it actually usefully does something.
- I would have liked to do a full integration between `cdk-assets` and
the correct Docker config, but unfortunately this only makes sense for a
2nd registry (not the primary registry we're pushing to). So we would
need either:
- A fake docker registry; I tried looking for one or faking one via a
static HTTP server, but the requirement of signing the image manifest
got me stuck. Also, the Docker registry/HTTP server needs to be
accessible from the Docker Host, so it can't easily run inside the
CodeBuild/GHA container; we would need to set up AWS infra to host this
static server which implies S3 + CloudFront or APIGW + Lambda, which
starts to get annoying.
- A real Docker registry that requires user/pass authentication; but now
we have to manage a username and password and security is going to make
us rotate it.
- An ECR repository; it must be in a different account or region,
because the registry name (`<account>.dkr.ecr.<region>.amazonaws.com`)
must be different. To make it in a different account or region, we would
need to run Atmosphere twice, but that doesn't help when we're running
locally or in a non-Atmosphere enabled environment.
- I would also have liked to do a test that reads from SecretsManager,
but at least the Atmosphere roles don't have permissions to use
SecretsManager and I'm not sure what other environments these tests run
in, so this test is commented out for now.
## Also in this PR
- Features to create and clean up a role in the integ tests.
- Properly configure the `cdk-assets` version to test (not just
`latest`, that will work in our online builds with a fake NPM repo but
won't work locally, for example). This needed some refactoring of the
"package sources" code to generalize the classes that were dealing with
the `aws-cdk` package to take a package name.
- Refactored the assets helper code a bit to pull out some helper
functions used to prepare assets.
- Fix a bug in `yarn-cling` that allows hoisting conflicting
dependencies into certain places if `yarn` has already hoisted them
during the proper install.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license
---------
Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: github-actions <github-actions@github.com>1 parent ded7ae1 commit 1f7527b
File tree
26 files changed
+1806
-1508
lines changed- packages
- @aws-cdk-testing/cli-integ
- .projen
- lib
- cli
- package-sources
- tests/cli-integ-tests/cdk-assets
- @aws-cdk
- cli-lib-alpha
- cloud-assembly-schema/schema
- integ-runner
- yarn-cling/lib
- aws-cdk
- lib/init-templates
- cdk-assets
- bin
26 files changed
+1806
-1508
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1639 | 1639 | | |
1640 | 1640 | | |
1641 | 1641 | | |
| 1642 | + | |
1642 | 1643 | | |
1643 | 1644 | | |
1644 | 1645 | | |
1645 | 1646 | | |
1646 | 1647 | | |
1647 | 1648 | | |
1648 | 1649 | | |
1649 | | - | |
| 1650 | + | |
1650 | 1651 | | |
1651 | 1652 | | |
1652 | 1653 | | |
| |||
1660 | 1661 | | |
1661 | 1662 | | |
1662 | 1663 | | |
| 1664 | + | |
1663 | 1665 | | |
1664 | 1666 | | |
1665 | 1667 | | |
| |||
1668 | 1670 | | |
1669 | 1671 | | |
1670 | 1672 | | |
1671 | | - | |
1672 | 1673 | | |
1673 | 1674 | | |
1674 | 1675 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
34 | | - | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
38 | | - | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
53 | 58 | | |
54 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
73 | 97 | | |
74 | 98 | | |
75 | 99 | | |
| |||
219 | 243 | | |
220 | 244 | | |
221 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
222 | 319 | | |
223 | 320 | | |
224 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| 116 | + | |
108 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
109 | 121 | | |
110 | 122 | | |
111 | | - | |
| 123 | + | |
112 | 124 | | |
113 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
114 | 133 | | |
115 | 134 | | |
116 | 135 | | |
117 | | - | |
| 136 | + | |
| 137 | + | |
118 | 138 | | |
119 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
120 | 143 | | |
121 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
122 | 153 | | |
123 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
124 | 161 | | |
125 | 162 | | |
126 | 163 | | |
| 164 | + | |
127 | 165 | | |
128 | 166 | | |
129 | 167 | | |
| |||
141 | 179 | | |
142 | 180 | | |
143 | 181 | | |
| 182 | + | |
144 | 183 | | |
145 | 184 | | |
146 | 185 | | |
| |||
171 | 210 | | |
172 | 211 | | |
173 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
174 | 217 | | |
175 | 218 | | |
176 | 219 | | |
177 | 220 | | |
| 221 | + | |
178 | 222 | | |
179 | 223 | | |
180 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments