Skip to content

Commit b2a4c4f

Browse files
authored
Merge branch 'main' into fix/propagate-cache-from
2 parents 5f607e7 + 1da368b commit b2a4c4f

File tree

10 files changed

+28
-18
lines changed

10 files changed

+28
-18
lines changed

.github/workflows/build-chat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
environment: ci
2121
steps:
2222
- name: Checkout Actions
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424
with:
2525
repository: "microsoft/vscode-github-triage-actions"
2626
path: ./actions

.github/workflows/dev-containers.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
name: CLI
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v1
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
1818
with:
1919
node-version: '18.x'
2020
registry-url: 'https://npm.pkg.github.com'
@@ -33,7 +33,7 @@ jobs:
3333
echo "TGZ=devcontainers-cli-${VERSION}.tgz" | tee -a $GITHUB_ENV
3434
echo "TGZ_UPLOAD=devcontainers-cli-${VERSION}-${GITHUB_SHA:0:8}.tgz" | tee -a $GITHUB_ENV
3535
- name: Store TGZ
36-
uses: actions/upload-artifact@v2
36+
uses: actions/upload-artifact@v4
3737
with:
3838
name: ${{ env.TGZ_UPLOAD }}
3939
path: ${{ env.TGZ }}
@@ -61,9 +61,9 @@ jobs:
6161
]
6262
steps:
6363
- name: Checkout
64-
uses: actions/checkout@v2
64+
uses: actions/checkout@v4
6565
- name: Setup Node.js
66-
uses: actions/setup-node@v1
66+
uses: actions/setup-node@v4
6767
with:
6868
node-version: '18.x'
6969
registry-url: 'https://npm.pkg.github.com'
@@ -88,9 +88,9 @@ jobs:
8888
runs-on: ubuntu-latest
8989
steps:
9090
- name: Checkout
91-
uses: actions/checkout@v2
91+
uses: actions/checkout@v4
9292
- name: Setup Node.js
93-
uses: actions/setup-node@v1
93+
uses: actions/setup-node@v4
9494
with:
9595
node-version: '18.x'
9696
registry-url: 'https://npm.pkg.github.com'

.github/workflows/publish-dev-containers.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Setup Node.js
15-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v4
1616
with:
1717
node-version: '18.x'
1818
registry-url: 'https://registry.npmjs.org'
@@ -33,7 +33,7 @@ jobs:
3333
echo "TGZ=devcontainers-cli-${VERSION}.tgz" | tee -a $GITHUB_ENV
3434
echo "TGZ_UPLOAD=devcontainers-cli-${VERSION}-${GITHUB_SHA:0:8}.tgz" | tee -a $GITHUB_ENV
3535
- name: Download TGZ
36-
uses: dawidd6/action-download-artifact@6f8f427fb41886a66b82ea11a5a15d1454c79415
36+
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
3737
with:
3838
workflow: dev-containers.yml
3939
workflow_conclusion: success

.github/workflows/test-plan-item-validator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- name: Checkout Actions
1111
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
with:
1414
repository: 'microsoft/vscode-github-triage-actions'
1515
ref: stable

.github/workflows/test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
4646
]
4747
steps:
4848
- name: Checkout
49-
uses: actions/checkout@v2
49+
uses: actions/checkout@v4
5050
- name: Setup Node.js
51-
uses: actions/setup-node@v1
51+
uses: actions/setup-node@v4
5252
with:
5353
node-version: '18.x'
5454
registry-url: 'https://npm.pkg.github.com'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Notable changes.
44

55
## March 2024
66

7+
### [0.58.0]
8+
- Allow empty value for remote env. (https://github.com/devcontainers/ci/issues/231)
9+
- Add generate-docs subcommand for templates and features. (https://github.com/devcontainers/cli/pull/759)
10+
- Only use SELinux label for Linux hosts. (https://github.com/devcontainers/cli/issues/776)
11+
712
### [0.57.0]
813
- Fix crash updating UID/GID when the image's platform is different from the native CPU arch (https://github.com/devcontainers/cli/pull/746)
914
- Add tags with build command (https://github.com/devcontainers/ci/issues/271)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@devcontainers/cli",
33
"description": "Dev Containers CLI",
4-
"version": "0.57.0",
4+
"version": "0.58.0",
55
"bin": {
66
"devcontainer": "devcontainer.js"
77
},

src/spec-configuration/containerFeaturesConfiguration.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ function escapeQuotesForShell(input: string) {
291291

292292
export function getFeatureLayers(featuresConfig: FeaturesConfig, containerUser: string, remoteUser: string, isBuildah = false, useBuildKitBuildContexts = false, contentSourceRootPath = '/tmp/build-features') {
293293

294+
const useSELinuxLabel = process.platform === 'linux' && isBuildah;
294295
const builtinsEnvFile = `${path.posix.join(FEATURES_CONTAINER_TEMP_DEST_FOLDER, 'devcontainer-features.builtin.env')}`;
295296
let result = `RUN \\
296297
echo "_CONTAINER_USER_HOME=$(${getEntPasswdShellCommand(containerUser)} | cut -d: -f6)" >> ${builtinsEnvFile} && \\
@@ -312,7 +313,7 @@ RUN chmod -R 0755 ${dest} \\
312313
313314
`;
314315
} else {
315-
result += `RUN --mount=type=bind,from=dev_containers_feature_content_source,source=${source},target=/tmp/build-features-src/${folder}${isBuildah ? ',z' : ''} \\
316+
result += `RUN --mount=type=bind,from=dev_containers_feature_content_source,source=${source},target=/tmp/build-features-src/${folder}${useSELinuxLabel ? ',z' : ''} \\
316317
cp -ar /tmp/build-features-src/${folder} ${FEATURES_CONTAINER_TEMP_DEST_FOLDER} \\
317318
&& chmod -R 0755 ${dest} \\
318319
&& cd ${dest} \\
@@ -340,7 +341,7 @@ RUN chmod -R 0755 ${dest} \\
340341
`;
341342
} else {
342343
result += `
343-
RUN --mount=type=bind,from=dev_containers_feature_content_source,source=${source},target=/tmp/build-features-src/${feature.consecutiveId}${isBuildah ? ',z' : ''} \\
344+
RUN --mount=type=bind,from=dev_containers_feature_content_source,source=${source},target=/tmp/build-features-src/${feature.consecutiveId}${useSELinuxLabel ? ',z' : ''} \\
344345
cp -ar /tmp/build-features-src/${feature.consecutiveId} ${FEATURES_CONTAINER_TEMP_DEST_FOLDER} \\
345346
&& chmod -R 0755 ${dest} \\
346347
&& cd ${dest} \\

src/test/container-features/configs/dockerfile-with-v2-oci-features/.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"features": {
99
"terraform": "latest",
10-
"ghcr.io/devcontainers/features/docker-in-docker@sha256:e32e8937c87345ff7a937d22cacb7f395d41deffde9943291ef3cc0ac91a8ac6": {},
10+
"ghcr.io/devcontainers/features/docker-in-docker@sha256:440bdb81cf8af43f3e922450d33db9775c1097340557a5b7b6fe705bc758c5ef": {},
1111
"node": "16"
1212
}
1313
}

src/test/container-features/e2e.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ describe('Dev Container Features E2E (remote)', function () {
6969
for (let i = 2; i >= 0; i--) {
7070
try {
7171
const res = await shellExec(`${cli} exec --workspace-folder ${testFolder} docker ps`);
72+
await shellExec(`${cli} exec --workspace-folder ${testFolder} ps ax`);
7273
assert.isNull(res.error);
7374
assert.match(res.stdout, /CONTAINER ID/);
7475
break;
7576
} catch (err) {
77+
await shellExec(`${cli} exec --workspace-folder ${testFolder} ps ax`);
7678
if (i === 0) {
7779
throw err;
7880
}
@@ -111,10 +113,12 @@ describe('Dev Container Features E2E (remote)', function () {
111113
for (let i = 2; i >= 0; i--) {
112114
try {
113115
const res = await shellExec(`${cli} exec --workspace-folder ${testFolder} docker ps`);
116+
await shellExec(`${cli} exec --workspace-folder ${testFolder} ps ax`);
114117
assert.isNull(res.error);
115118
assert.match(res.stdout, /CONTAINER ID/);
116119
break;
117120
} catch (err) {
121+
await shellExec(`${cli} exec --workspace-folder ${testFolder} ps ax`);
118122
if (i === 0) {
119123
throw err;
120124
}

0 commit comments

Comments
 (0)