Skip to content

Commit e7035f1

Browse files
committed
feat: add gherkin container flavor
1 parent f56ee65 commit e7035f1

File tree

13 files changed

+182
-22
lines changed

13 files changed

+182
-22
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"image": "ghcr.io/philips-software/amp-devcontainer-gherkin:${localEnv:IMAGE_VERSION}",
3+
"workspaceFolder": "/workspaces/amp-devcontainer/test/gherkin/workspace"
4+
}

.devcontainer/gherkin/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM ubuntu:24.04@sha256:b59d21599a2b151e23eea5f6602f4af4d7d31c4e236d22bf0b62b86d2e386b8f
2+
3+
ARG BATS_VERSION=1.11.0
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
7+
HEALTHCHECK NONE
8+
9+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
10+
11+
# Install the base system with all tool dependencies
12+
# hadolint ignore=DL3008
13+
RUN --mount=type=bind,source=.devcontainer/gherkin/apt-requirements-base.json,target=/tmp/apt-requirements-base.json \
14+
--mount=type=cache,target=/var/cache/apt,sharing=locked \
15+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
16+
--mount=type=cache,target=/var/log,sharing=locked \
17+
apt-get update && apt-get install -y --no-install-recommends jq \
18+
&& jq -r 'to_entries | .[] | .key + "=" + .value' /tmp/apt-requirements-base.json | \
19+
xargs apt-get install -y --no-install-recommends \
20+
&& cp /etc/skel/.bashrc /root/.bashrc
21+
22+
# Include the Cisco Umbrella PKI Root
23+
RUN wget -qO /usr/local/share/ca-certificates/Cisco_Umbrella_Root_CA.crt https://www.cisco.com/security/pki/certs/ciscoumbrellaroot.pem \
24+
&& update-ca-certificates
25+
26+
# Install bats
27+
RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
28+
&& wget -qO - "https://github.com/bats-core/bats-core/archive/refs/tags/v${BATS_VERSION}.tar.gz" | tar xz -C "${batstmp}" \
29+
&& bash "${batstmp}/bats-core-${BATS_VERSION}/install.sh" /usr/local \
30+
&& rm -rf "${batstmp}" \
31+
&& git -C /usr/local clone -b v0.3.0 https://github.com/bats-core/bats-support.git \
32+
&& git -C /usr/local clone -b v2.1.0 https://github.com/bats-core/bats-assert.git
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"bash-completion": "1:2.11-8",
3+
"ca-certificates": "20240203",
4+
"git": "1:2.43.0-1ubuntu7.2",
5+
"gnupg2": "2.4.4-2ubuntu17.2",
6+
"wget": "1.21.4-1ubuntu4.1"
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"remoteEnv": {
3+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
4+
},
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
9+
10+
11+
]
12+
}
13+
}
14+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile",
4+
"context": "../.."
5+
},
6+
"remoteEnv": {
7+
"CONTAINER_FLAVOR": "gherkin"
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"settings": {
12+
"files.insertFinalNewline": true,
13+
"files.trimTrailingWhitespace": true
14+
},
15+
"extensions": [
16+
17+
18+
19+
20+
21+
22+
23+
]
24+
}
25+
}
26+
}

.github/workflows/pr-image-cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
flavor: ["cpp", "rust"]
18+
flavor: [cpp, gherkin, rust]
1919
permissions:
2020
packages: write
2121
steps:

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
update-release-notes:
6060
strategy:
6161
matrix:
62-
flavor: [cpp, rust]
62+
flavor: [cpp, gherkin, rust]
6363
runs-on: ubuntu-latest
6464
permissions:
6565
contents: write

.github/workflows/update-dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
flavor: ["cpp", "rust"]
16+
flavor: [cpp, gherkin, rust]
1717
# Using our own container is required since we need all package sources
1818
# set-up correctly.
1919
container: ghcr.io/philips-software/amp-devcontainer-${{ matrix.flavor }}:edge
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
strategy:
5050
matrix:
51-
flavor: ["cpp", "rust"]
51+
flavor: [cpp, gherkin, rust]
5252
permissions:
5353
contents: write
5454
pull-requests: write

.github/workflows/vulnerability-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
flavor: ["cpp", "rust"]
16+
flavor: [cpp, gherkin, rust]
1717
permissions:
1818
security-events: write
1919
steps:

.github/workflows/wc-build-push-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
build-push:
2626
strategy:
2727
matrix:
28-
flavor: [cpp, rust]
28+
flavor: [cpp, gherkin, rust]
2929
uses: ./.github/workflows/wc-build-push.yml
3030
permissions:
3131
actions: read
@@ -61,7 +61,7 @@ jobs:
6161
integration-test:
6262
strategy:
6363
matrix:
64-
flavor: [cpp, rust]
64+
flavor: [cpp, gherkin, rust]
6565
runner: ["ubuntu-latest", "ubuntu-24.04-arm"]
6666
needs: build-push
6767
uses: ./.github/workflows/wc-integration-test.yml

0 commit comments

Comments
 (0)