diff --git a/.github/actions/integration-tests/action.yml b/.github/actions/integration-tests/action.yml index ce51ed144f232d..44197b9b1424d8 100644 --- a/.github/actions/integration-tests/action.yml +++ b/.github/actions/integration-tests/action.yml @@ -53,18 +53,10 @@ runs: PREVIEW_NAME: ${{ inputs.preview_name }} run: | export LEEWAY_WORKSPACE_ROOT="$(pwd)" - export HOME="/home/gitpod" - export PREVIEW_ENV_DEV_SA_KEY_PATH="/home/gitpod/.config/gcloud/preview-environment-dev-sa.json" - - echo "${PREVIEW_ENV_DEV_SA_KEY}" > "${PREVIEW_ENV_DEV_SA_KEY_PATH}" - gcloud auth activate-service-account --key-file "${PREVIEW_ENV_DEV_SA_KEY_PATH}" leeway run dev/preview/previewctl:install - echo "Setting up access to core-dev and harvester" - previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}" - - previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 1m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}" + previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 1m - name: Integration Test id: integration-test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0952550573eaa8..bc83e8c8a9334e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -151,6 +151,7 @@ jobs: large_vm: ${{ needs.configuration.outputs.with_large_vm }} preemptible: ${{ needs.configuration.outputs.with_preemptible }} recreate_vm: ${{ inputs.recreate_vm }} + image_repo_base: ${{needs.configuration.outputs.image_repo_base}}/build build-gitpod: name: Build Gitpod @@ -419,6 +420,7 @@ jobs: uses: ./.github/actions/deploy-monitoring-satellite with: previewctl_hash: ${{ needs.build-previewctl.outputs.previewctl_hash }} + image_repo_base: ${{needs.configuration.outputs.image_repo_base}}/build integration-test: name: "Run integration test" diff --git a/.github/workflows/ide-integration-tests.yml b/.github/workflows/ide-integration-tests.yml index 4299199e09f0ae..13cfdf80547d62 100644 --- a/.github/workflows/ide-integration-tests.yml +++ b/.github/workflows/ide-integration-tests.yml @@ -105,6 +105,7 @@ jobs: infrastructure_provider: gce large_vm: true preemptible: true + image_repo_base: ${{ github.event.inputs.image_repo_base }} - name: Deploy Gitpod to the preview environment id: deploy-gitpod if: github.event.inputs.skip_deploy != 'true' @@ -217,6 +218,7 @@ jobs: uses: ./.github/actions/delete-preview with: name: ${{ needs.configuration.outputs.name }} + image_repo_base: ${{ github.ref == 'refs/heads/main' && 'eu.gcr.io/gitpod-core-dev/build' || 'eu.gcr.io/gitpod-dev-artifact/build' }} delete-runner: if: always() diff --git a/.github/workflows/preview-env-check-regressions.yml b/.github/workflows/preview-env-check-regressions.yml index e4a434cf1dde53..1730dd1dae10ad 100644 --- a/.github/workflows/preview-env-check-regressions.yml +++ b/.github/workflows/preview-env-check-regressions.yml @@ -81,6 +81,7 @@ jobs: infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }} large_vm: false preemptible: true + image_repo_base: ${{ github.event.inputs.image_repo_base }} - name: Deploy Gitpod to the preview environment id: deploy-gitpod uses: ./.github/actions/deploy-gitpod @@ -189,6 +190,7 @@ jobs: uses: ./.github/actions/delete-preview with: name: ${{ needs.configuration.outputs.name }} + image_repo_base: ${{ github.event.inputs.image_repo_base }} delete-runner: if: always() diff --git a/.github/workflows/preview-env-delete.yml b/.github/workflows/preview-env-delete.yml index 0c197140d08a1d..ba0bde1baa7e48 100644 --- a/.github/workflows/preview-env-delete.yml +++ b/.github/workflows/preview-env-delete.yml @@ -24,7 +24,7 @@ jobs: uses: ./.github/actions/delete-preview with: name: ${{ github.event.inputs.name || github.event.ref}} - sa_key: ${{ secrets.GCP_CREDENTIALS }} + image_repo_base: ${{ github.ref == 'refs/heads/main' && 'eu.gcr.io/gitpod-core-dev/build' || 'eu.gcr.io/gitpod-dev-artifact/build' }} delete-runner: if: always() diff --git a/.github/workflows/preview-env-gc.yml b/.github/workflows/preview-env-gc.yml index d331f502b52196..aaecb87b80c29e 100644 --- a/.github/workflows/preview-env-gc.yml +++ b/.github/workflows/preview-env-gc.yml @@ -62,7 +62,7 @@ jobs: uses: ./.github/actions/delete-preview with: name: ${{ matrix.name }} - sa_key: ${{ secrets.GCP_CREDENTIALS }} + image_repo_base: ${{ github.ref == 'refs/heads/main' && 'eu.gcr.io/gitpod-core-dev/build' || 'eu.gcr.io/gitpod-dev-artifact/build' }} delete-runner: if: always() diff --git a/.github/workflows/workspace-integration-tests.yml b/.github/workflows/workspace-integration-tests.yml index 7763a8607f1b72..28f91c9c26d4c9 100644 --- a/.github/workflows/workspace-integration-tests.yml +++ b/.github/workflows/workspace-integration-tests.yml @@ -143,6 +143,7 @@ jobs: infrastructure_provider: gce large_vm: true preemptible: true + image_repo_base: ${{ github.event.inputs.image_repo_base }} - name: Deploy Gitpod to the preview environment if: inputs.skip_deploy != 'true' id: deploy-gitpod @@ -201,6 +202,7 @@ jobs: uses: ./.github/actions/delete-preview with: name: ${{ needs.configuration.outputs.name }} + image_repo_base: ${{ github.event.inputs.image_repo_base }} delete-runner: if: always() diff --git a/dev/preview/previewctl/BUILD.yaml b/dev/preview/previewctl/BUILD.yaml index 647bc1824d8eea..0667b1784eb76e 100644 --- a/dev/preview/previewctl/BUILD.yaml +++ b/dev/preview/previewctl/BUILD.yaml @@ -43,6 +43,13 @@ scripts: - name: download description: script: | + IMAGE_REPO_BASE=eu.gcr.io/gitpod-core-dev/build + if [[ -n "$INPUT_IMAGE_REPO_BASE" ]]; then + IMAGE_REPO_BASE=$INPUT_IMAGE_REPO_BASE + fi + + echo $IMAGE_REPO_BASE + if [[ -z "$INPUT_PREVIEWCTL_HASH" ]]; then # If a specific hash isn't provided we'll use the latest image off main PREVIEWCTL_VERSION=$(\