Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
iQQBot committed Apr 23, 2024
1 parent caa6025 commit a9fb5f3
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
10 changes: 1 addition & 9 deletions .github/actions/integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ide-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/preview-env-check-regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-env-gc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workspace-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 7 additions & 0 deletions dev/preview/previewctl/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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=$(\
Expand Down

0 comments on commit a9fb5f3

Please sign in to comment.