Skip to content

Commit 46ae2f5

Browse files
geroplona-agent
andauthored
Fix test skip mechanism and update leeway to v0.10.8 (#21190)
* Fix test skip mechanism to handle empty env vars The ifEnvVarNotSet function was only checking for undefined, but in CI environments variables can be set to empty strings. This caused tests to run when they should have been skipped, resulting in 401 errors. Now checks for both undefined and empty string values. Co-authored-by: Ona <[email protected]> * [content-service] Fix outdated test expectations * [dev] Drop "--ignore-scripts" for yarn, as we rely on it in a number of places * [dev] Use new dev-image throughout CI: dev-environment:fix-skip-if-empty-env-vars-gha.22 * [dev] Update leeway to v0.10.7 Co-authored-by: Ona <[email protected]> * [dev] Use new dev-image throughout CI: dev-environment:fix-skip-if-empty-env-vars-gha.25 Co-authored-by: Ona <[email protected]> * [dev] Update dev-environment image in GitHub action Dockerfiles Co-authored-by: Ona <[email protected]> * [dev] Update leeway to v0.10.8 Co-authored-by: Ona <[email protected]> * [dev] Use new dev-image throughout CI: dev-environment:fix-skip-if-empty-env-vars-gha.29 Co-authored-by: Ona <[email protected]> * [installer] Fix dependency to outdated helm registry Co-authored-by: Ona <[email protected]> --------- Co-authored-by: Ona <[email protected]>
1 parent a7ea249 commit 46ae2f5

File tree

19 files changed

+49
-51
lines changed

19 files changed

+49
-51
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ ARG TARGETOS
9393

9494
# Install dependencies
9595
USER root
96-
ARG LEEWAY_VERSION=0.10.6
96+
ARG LEEWAY_VERSION=0.10.8
9797
ENV LEEWAY_MAX_PROVENANCE_BUNDLE_SIZE=8388608
9898
ENV LEEWAY_WORKSPACE_ROOT=/workspace/gitpod
9999
ENV LEEWAY_REMOTE_CACHE_BUCKET=leeway-cache-dev-3ac8ef5
@@ -336,12 +336,6 @@ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh |
336336
&& nvm install v${NODE_VERSION} \
337337
&& nvm alias default v${NODE_VERSION}"
338338

339-
# Disable npm/yarn lifecycle scripts by default (security hardening)
340-
# To allow specific packages, use: npm rebuild <package> or yarn rebuild <package>
341-
RUN npm config set ignore-scripts true --location=global && \
342-
npm config set ignore-scripts true --location=user && \
343-
echo 'ignore-scripts true' >> ~/.yarnrc
344-
345339
# Disable npx (security hardening - prevents arbitrary package execution)
346340
# Remove npx from NVM and replace with stub that prints warning
347341
RUN rm -f /usr/bin/npx /usr/local/bin/npx && \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]

.github/workflows/branch-build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
108108
runs-on: ubuntu-latest-16-cores
109109
container:
110-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
110+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
111111
options: --user root
112112
steps:
113113
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
@@ -122,6 +122,7 @@ jobs:
122122
shell: bash
123123
env:
124124
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
125+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
125126
run: |
126127
leeway build dev/preview/previewctl:cli --cache remote
127128
infrastructure:
@@ -180,7 +181,7 @@ jobs:
180181
ports:
181182
- 6379:6379
182183
container:
183-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
184+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
184185
options: --user root
185186
env:
186187
DB_HOST: "mysql"
@@ -214,6 +215,7 @@ jobs:
214215
JAVA_HOME: /home/gitpod/.sdkman/candidates/java/current
215216
VERSION: ${{needs.configuration.outputs.version}}
216217
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
218+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
217219
IMAGE_REPO_BASE: ${{needs.configuration.outputs.image_repo_base}}/dev
218220
shell: bash
219221
run: |
@@ -261,6 +263,7 @@ jobs:
261263
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
262264
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
263265
IMAGE_REPO_BASE: ${{needs.configuration.outputs.image_repo_base}}/build
266+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
264267

265268
# SCM tokens for integration tests
266269
GITPOD_TEST_TOKEN_BITBUCKET: "${{ secrets.GITPOD_TEST_TOKEN_BITBUCKET }}"
@@ -516,7 +519,7 @@ jobs:
516519
environment: branch-build
517520
runs-on: ubuntu-latest
518521
container:
519-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
522+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
520523
options: --user root
521524
if: needs.configuration.outputs.with_integration_tests != '' && needs.configuration.outputs.is_scheduled_run != 'true'
522525
concurrency:

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
111111
runs-on: ubuntu-latest-16-cores
112112
container:
113-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
113+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
114114
options: --user root
115115
steps:
116116
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
@@ -125,6 +125,7 @@ jobs:
125125
shell: bash
126126
env:
127127
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
128+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
128129
run: |
129130
leeway build dev/preview/previewctl:cli --cache remote
130131
infrastructure:
@@ -183,7 +184,7 @@ jobs:
183184
ports:
184185
- 6379:6379
185186
container:
186-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
187+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
187188
options: --user root
188189
env:
189190
DB_HOST: "mysql"
@@ -217,6 +218,7 @@ jobs:
217218
JAVA_HOME: /home/gitpod/.sdkman/candidates/java/current
218219
VERSION: ${{needs.configuration.outputs.version}}
219220
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
221+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
220222
IMAGE_REPO_BASE: ${{needs.configuration.outputs.image_repo_base}}/dev
221223
shell: bash
222224
run: |
@@ -264,6 +266,7 @@ jobs:
264266
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
265267
LEEWAY_REMOTE_CACHE_BUCKET: ${{needs.configuration.outputs.leeway_cache_bucket}}
266268
IMAGE_REPO_BASE: ${{needs.configuration.outputs.image_repo_base}}/build
269+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
267270

268271
# SCM tokens for integration tests
269272
GITPOD_TEST_TOKEN_BITBUCKET: "${{ secrets.GITPOD_TEST_TOKEN_BITBUCKET }}"
@@ -519,7 +522,7 @@ jobs:
519522
environment: main-build
520523
runs-on: ubuntu-latest
521524
container:
522-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
525+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
523526
options: --user root
524527
if: needs.configuration.outputs.with_integration_tests != '' && needs.configuration.outputs.is_scheduled_run != 'true'
525528
concurrency:

.github/workflows/code-nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
container:
14-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
14+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
1515
options: --user root
1616
steps:
1717
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
@@ -26,6 +26,7 @@ jobs:
2626
PR_DESC: "${{ steps.pr-details.outputs.pr_body }}"
2727
MAIN_BRANCH: ${{ (github.head_ref || github.ref) == 'refs/heads/main' }}
2828
LEEWAY_REMOTE_CACHE_BUCKET: ${{ github.ref == 'refs/heads/main' && 'leeway-cache-main-c514a01' || 'leeway-cache-dev-3ac8ef5' }}
29+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
2930
run: |
3031
export LEEWAY_WORKSPACE_ROOT=$GITHUB_WORKSPACE
3132

.github/workflows/ide-integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
name: Configuration
3737
runs-on: ubuntu-latest
3838
container:
39-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
39+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
4040
options: --user root
4141
outputs:
4242
name: ${{ steps.configuration.outputs.name }}
@@ -125,7 +125,7 @@ jobs:
125125
needs: [configuration, infrastructure]
126126
runs-on: ubuntu-latest
127127
container:
128-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
128+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
129129
options: --user root
130130
volumes:
131131
- /var/tmp:/var/tmp

.github/workflows/jetbrains-auto-update-template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
update-jetbrains:
1616
runs-on: ubuntu-latest
1717
container:
18-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
18+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
1919
options: --user root
2020
steps:
2121
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # pin@v2
@@ -47,6 +47,7 @@ jobs:
4747
env:
4848
LEEWAY_MAX_PROVENANCE_BUNDLE_SIZE: "8388608"
4949
LEEWAY_REMOTE_CACHE_BUCKET: ${{ github.ref == 'refs/heads/main' && 'leeway-cache-main-c514a01' || 'leeway-cache-dev-3ac8ef5' }}
50+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
5051
run: |
5152
echo "May upgrade latest ${{ inputs.productId }} image with ${{ steps.find-target.outputs.editorSummary }}"
5253
imageRepoBase=${{ github.ref == 'refs/heads/main' && 'eu.gcr.io/gitpod-core-dev/build' || 'eu.gcr.io/gitpod-dev-artifact/build' }}

.github/workflows/jetbrains-integration-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ on:
3434
jobs:
3535
jetbrains-smoke-test-linux:
3636
container:
37-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
37+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:fix-skip-if-empty-env-vars-gha.29
3838
options: --user root
3939
runs-on: ubuntu-latest
4040
steps:
@@ -89,6 +89,7 @@ jobs:
8989
DISPLAY: ":10"
9090
LEEWAY_MAX_PROVENANCE_BUNDLE_SIZE: "8388608"
9191
LEEWAY_REMOTE_CACHE_BUCKET: "${{ needs.configuration.outputs.leeway_cache_bucket }}"
92+
LEEWAY_CACHE_UPLOAD_IMMEDIATE: true
9293
TEST_USE_LATEST: ${{ inputs.use_latest }}
9394
run: |
9495
export GATEWAY_LINK=$(jq -r '.inputs.secret_gateway_link' $GITHUB_EVENT_PATH)

0 commit comments

Comments
 (0)