Skip to content

Commit c05f731

Browse files
Fix codespace
- Requires newer ubuntu baseline image - Set minimum VM requirements - Run configure-e2e.sh script - Fix exporting variables set in step's `env` Issue: ZENKO-5096
1 parent 904c4e0 commit c05f731

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/base:jammy
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
22
ENV YQ_VERSION=v4.27.5
33
ENV TILT_VERSION=0.23.4
44
ENV KUSTOMIZE_VERSION=v4.4.1

.devcontainer/devcontainer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"name": "Codespace",
3+
"hostRequirements": {
4+
"cpus": 8,
5+
"memory": "32gb",
6+
"storage": "128gb"
7+
},
38
"build": {
49
"context": ".",
510
"dockerfile": "Dockerfile"
@@ -86,6 +91,11 @@
8691
}
8792
}
8893
}
94+
},
95+
"vscode": {
96+
"extensions": [
97+
"ms-kubernetes-tools.vscode-kubernetes-tools",
98+
]
8999
}
90100
},
91101
"containerEnv": {

.devcontainer/setup.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ for i in $(seq 0 $array_length); do
2323

2424
# Inject variables
2525
# We use `sed` to replace github variable references and avoid bad substitution error from bash
26-
env_variables=$(yq '.runs.steps[$i].env | to_entries | .[] | .key + "=\"" + .value + "\""' .github/actions/deploy/action.yaml \
26+
env_variables=$(yq '.runs.steps['$i'].env | to_entries | .[] | .key + "=" + .value' .github/actions/deploy/action.yaml \
2727
| sed 's/\${{.*}}//')
28-
eval "$env_variables"
28+
[ -n "$env_variables" ] && export $env_variables
2929

3030
if [ "$working_dir" != "null" ]; then
3131
echo "Changing working dir: $working_dir"
@@ -45,6 +45,10 @@ done
4545
if [[ "${ENABLE_RING_TESTS}" == "false" ]]; then
4646
yq -i 'del(.locations[] | select(.locationType == "location-scality-ring-s3-v1"))' e2e-config.yaml
4747
fi
48+
49+
# Disable GCP tests as we don't have credentials setup in devcontainer
50+
yq -i 'del(.locations[] | select(.locationType == "location-gcp-v1"))' e2e-config.yaml
51+
4852
docker build -t $E2E_IMAGE_NAME:$E2E_IMAGE_TAG .
4953
kind load docker-image ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG}
5054
docker rmi ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG}
@@ -53,6 +57,8 @@ done
5357
(
5458
cd .github/scripts/end2end
5559

60+
bash configure-e2e.sh
61+
5662
bash configure-e2e-ctst.sh
5763
)
5864

0 commit comments

Comments
 (0)