@@ -11,9 +11,6 @@ inputs:
11
11
preview_name :
12
12
description : " Name of the preview environment to run the tests against"
13
13
required : true
14
- sa_key :
15
- description : " The service account key to use when authenticating with GCP"
16
- required : true
17
14
github_token :
18
15
description : " The GitHub token to use when authenticating with GitHub"
19
16
required : true
@@ -30,50 +27,64 @@ inputs:
30
27
test_build_ref :
31
28
description : " The build ref of the test run. Used in the IDE integration tests."
32
29
required : false
33
-
30
+ integration_test_username :
31
+ description : " The username for integration test"
32
+ required : true
33
+ integration_test_usertoken :
34
+ description : " The username for integration test"
35
+ required : true
36
+ identity_provider :
37
+ description : " GCP workload identity provider"
38
+ required : true
39
+ service_account :
40
+ description : " GCP service account"
41
+ required : true
42
+ leeway_segment_key :
43
+ description : " leeway analytics key"
44
+ required : true
34
45
runs :
35
46
using : " composite"
36
47
steps :
48
+ - uses : actions/checkout@v4
49
+ - id : env-vars
50
+ name : configure env variables
51
+ shell : bash
52
+ run : |
53
+ {
54
+ echo "LEEWAY_SEGMENT_KEY=${{ inputs.leeway_segment_key }}"
55
+ echo "LEEWAY_WORKSPACE_ROOT=$GITHUB_WORKSPACE"
56
+ echo "HOME=/home/gitpod"
57
+ } >> "$GITHUB_ENV"
37
58
- id : auth
38
- uses : google-github-actions/auth@v1
59
+ name : Authenticate to Google Cloud
60
+ uses : google-github-actions/auth@v2
39
61
with :
40
- token_format : access_token
41
- credentials_json : " ${{ inputs.sa_key }}"
42
- - name : Get Secrets from GCP
43
- id : " secrets"
44
- uses : " google-github-actions/get-secretmanager-secrets@v1"
62
+ workload_identity_provider : " ${{ inputs.identity_provider }}"
63
+ service_account : " ${{ inputs.service_account }}"
64
+ - name : ' Set up Cloud SDK'
65
+ uses : ' google-github-actions/setup-gcloud@v2'
45
66
with :
46
- secrets : |-
47
- WORKSPACE_INTEGRATION_TEST_USERNAME:gitpod-core-dev/workspace-integration-test-username
48
- WORKSPACE_INTEGRATION_TEST_USER_TOKEN:gitpod-core-dev/workspace-integration-test-user-token
67
+ skip_install : true
68
+ - id : docker
69
+ name : configure docker
70
+ shell : bash
71
+ run : |
72
+ gcloud auth configure-docker eu.gcr.io --quiet
49
73
- name : Setup
50
74
shell : bash
51
75
env :
52
- PREVIEW_ENV_DEV_SA_KEY : ${{ inputs.sa_key }}
53
76
PREVIEW_NAME : ${{ inputs.preview_name }}
54
77
run : |
55
- export LEEWAY_WORKSPACE_ROOT="$(pwd)"
56
- export HOME="/home/gitpod"
57
- export PREVIEW_ENV_DEV_SA_KEY_PATH="/home/gitpod/.config/gcloud/preview-environment-dev-sa.json"
58
-
59
- echo "${PREVIEW_ENV_DEV_SA_KEY}" > "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
60
- gcloud auth activate-service-account --key-file "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
61
-
62
78
leeway run dev/preview/previewctl:install
63
-
64
- echo "Setting up access to core-dev and harvester"
65
- previewctl get-credentials --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
66
-
67
- previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 1m --gcp-service-account "${PREVIEW_ENV_DEV_SA_KEY_PATH}"
79
+ previewctl install-context --branch "${PREVIEW_NAME}" --log-level debug --timeout 10m
68
80
69
81
- name : Integration Test
70
82
id : integration-test
71
83
shell : bash
72
84
env :
73
85
ROBOQUAT_TOKEN : ${{ inputs.github_token }}
74
- INTEGRATION_TEST_USERNAME : ${{ steps.secrets.outputs.WORKSPACE_INTEGRATION_TEST_USERNAME }}
75
- INTEGRATION_TEST_USER_TOKEN : ${{ steps.secrets.outputs.WORKSPACE_INTEGRATION_TEST_USER_TOKEN }}
76
- PREVIEW_ENV_DEV_SA_KEY : ${{ inputs.sa_key }}
86
+ INTEGRATION_TEST_USERNAME : ${{ inputs.integration_test_username }}
87
+ INTEGRATION_TEST_USER_TOKEN : ${{ inputs.integration_test_usertoken }}
77
88
PREVIEW_NAME : ${{ inputs.preview_name }}
78
89
TEST_USE_LATEST_VERSION : ${{ inputs.latest_ide_version }}
79
90
TEST_BUILD_ID : ${{ inputs.test_build_id }}
0 commit comments