@@ -2,9 +2,9 @@ name: Integration Test
22
33on :
44 push :
5- branches : [master, "feature/*"]
5+ branches : [master, "feature/*", "release-nextgen-*" ]
66 pull_request :
7- branches : [master, "feature/*"]
7+ branches : [master, "feature/*", "release-nextgen-*" ]
88
99jobs :
1010 integration-local :
@@ -137,6 +137,9 @@ jobs:
137137 integration-next-gen-tikv :
138138 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
139139 runs-on : ubuntu-latest
140+ permissions :
141+ contents : read
142+ id-token : write
140143 steps :
141144 - name : Checkout
142145 uses : actions/checkout@v2
@@ -149,18 +152,54 @@ jobs:
149152 - name : Install gotestsum
150153 run : go install gotest.tools/gotestsum@latest
151154
152- - name : Fetch PD
155+ - name : Resolve Next-Gen Image Tags
156+ id : resolve-nextgen-tags
157+ shell : bash
158+ run : |
159+ target_branch="${GITHUB_BASE_REF:-${GITHUB_REF_NAME}}"
160+
161+ case "${target_branch}" in
162+ release-nextgen-*)
163+ pd_tag="${target_branch}"
164+ tikv_tag="${target_branch}"
165+ ;;
166+ *)
167+ pd_tag="master-nextgen"
168+ tikv_tag="cloud-engine-nextgen"
169+ ;;
170+ esac
171+
172+ echo "pd_tag=${pd_tag}" >> "${GITHUB_OUTPUT}"
173+ echo "tikv_tag=${tikv_tag}" >> "${GITHUB_OUTPUT}"
174+
175+ - name : Authenticate to Google Cloud
176+ id : auth
177+ uses : google-github-actions/auth@v3
178+ with :
179+ project_id : pingcap-testing-account
180+ workload_identity_provider : projects/890604261603/locations/global/workloadIdentityPools/github-tikv/providers/github-oidc
181+ service_account : tidbx-gar-reader@pingcap-testing-account.iam.gserviceaccount.com
182+ token_format : access_token
183+
184+ - name : Login to GAR
185+ uses : docker/login-action@v3
186+ with :
187+ registry : us-docker.pkg.dev
188+ username : oauth2accesstoken
189+ password : ${{ steps.auth.outputs.access_token }}
190+
191+ - name : Fetch Next-Gen PD
153192 uses : shrink/actions-docker-extract@v1
154193 id : extract-pd
155194 with :
156- image : pingcap/pd:nightly
195+ image : us-docker.pkg.dev/ pingcap-testing-account/tidbx/tikv/pd/image:${{ steps.resolve-nextgen-tags.outputs.pd_tag }}
157196 path : /pd-server
158197
159198 - name : Fetch Next-Gen TiKV
160199 uses : shrink/actions-docker-extract@v1
161200 id : extract-tikv
162201 with :
163- image : gcr.io /pingcap-public/dbaas /tikv:dedicated-next-gen
202+ image : us-docker.pkg.dev /pingcap-testing-account/tidbx /tikv/tikv/image:${{ steps.resolve-nextgen-tags.outputs.tikv_tag }}
164203 path : /tikv-server
165204
166205 - name : Run MinIO, PD & Next-Gen TiKV
@@ -178,7 +217,7 @@ jobs:
178217 ./pd-server --config pd_next_gen.toml > pd.log 2>&1 &
179218 sleep 5
180219 ./tikv-server -C tikv_next_gen.toml --pd-endpoints="127.0.0.1:2379" --addr="127.0.0.1:20160" --data-dir=${{ github.workspace }}/integration_tests/tikv-data > tikv.log 2>&1 &
181-
220+
182221 echo "Waiting for servers to start..."
183222 sleep 15
184223
0 commit comments