99
1010env :
1111 MAPPING : |
12- build_nats_server=src/code.cloudfoundry.org/vendor/github.com/nats-io/nats-server/v2
12+ build_nats_server=src/code.cloudfoundry.org/vendor/github.com/nats-io/nats-server/v2
1313 FLAGS : |
14- --keep-going
15- --trace
16- -r
17- --fail-on-pending
18- --randomize-all
19- --nodes=7
20- --race
21- --timeout 30m
22- --flake-attempts 2
14+ --keep-going
15+ --trace
16+ -r
17+ --fail-on-pending
18+ --randomize-all
19+ --nodes=7
20+ --race
21+ --timeout 30m
22+ --flake-attempts 2
2323 RUN_AS : root
2424 VERIFICATIONS : |
2525 verify_go repo/$DIR
2828 verify_govet repo/$DIR
2929 verify_staticcheck repo/$DIR
3030 FUNCTIONS : " "
31- DB : " "
31+ DB : " "
3232
3333jobs :
3434 repo-clone :
3535 if : github.event.label.name == 'ready-to-run'
3636 runs-on : ubuntu-latest
3737 steps :
3838 - name : cf-networking-release-repo
39- uses : actions/checkout@v4
39+ uses : actions/checkout@v4.3.1
4040 with :
4141 repository : ${{ github.event.pull_request.head.repo.full_name }}
4242 ref : ${{ github.event.pull_request.head.ref }}
4343 submodules : recursive
4444 path : repo
4545 - name : Check out wg-appruntime code
46- uses : actions/checkout@v4
46+ uses : actions/checkout@v4.3.1
4747 with :
4848 repository : cloudfoundry/wg-app-platform-runtime-ci
4949 path : ci
@@ -55,47 +55,56 @@ jobs:
5555 uses : actions/upload-artifact@v4
5656 with :
5757 name : repo
58- path : |
59- repo-artifact.tar.gz
60- ci-artifact.tar.gz
58+ path : |
59+ repo-artifact.tar.gz
60+ ci-artifact.tar.gz
61+ determine-image-tag :
62+ if : github.event.label.name == 'ready-to-run'
63+ runs-on : ubuntu-latest
64+ outputs :
65+ go_version : ${{ steps.get-version.outputs.go_version }}
66+ steps :
67+ - name : checkout ci repo
68+ uses : actions/checkout@v4.3.1
69+ with :
70+ repository : cloudfoundry/wg-app-platform-runtime-ci
71+ sparse-checkout : go-version.json
72+ sparse-checkout-cone-mode : false
73+ - name : get-version
74+ id : get-version
75+ run : |
76+ version=$(jq -r '.releases["cf-networking"] // .default' go-version.json)
77+ echo "go_version=${version}" >> "$GITHUB_OUTPUT"
6178 template-tests :
6279 runs-on : ubuntu-latest
63- needs : repo-clone
64- container :
65- image : us-central1-docker.pkg.dev/app-runtime-platform-wg/dockerhub-mirror/cloudfoundry/tas-runtime-build
66- credentials :
67- username : _json_key
68- password : ${{ secrets.GCP_SERVICE_ACCOUNT_TAS_RUNTIME_BUILD_IMAGE_READER }}
80+ needs : [repo-clone, determine-image-tag]
81+ container : cloudfoundry/tas-runtime-build:${{ needs.determine-image-tag.outputs.go_version }}
6982 steps :
7083 - name : Download artifact
7184 uses : actions/download-artifact@v4
7285 with :
7386 name : repo
74- - run : " tar -xzvf repo-artifact.tar.gz\n tar -xzvf ci-artifact.tar.gz\n "
87+ - run : |
88+ tar -xzvf repo-artifact.tar.gz
89+ tar -xzvf ci-artifact.tar.gz
7590 - name : template-tests
7691 run : |
7792 "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-tests-templates/task.bash
7893 test-on-mysql-5-7 :
7994 runs-on : ubuntu-latest
95+ needs : [repo-clone, determine-image-tag]
8096 env :
81- BUILD_IMAGE : us-central1-docker.pkg.dev/app-runtime-platform-wg/dockerhub-mirror/cloudfoundry/tas-runtime-mysql-5.7
82- needs : repo-clone
97+ BUILD_IMAGE : cloudfoundry/tas-runtime-mysql-5.7:${{ needs.determine-image-tag.outputs.go_version }}
8398 steps :
8499 - name : Download artifact
85100 uses : actions/download-artifact@v4
86101 with :
87- name : repo
88- - name : Authenticate with GCP
89- uses : google-github-actions/auth@v2
90- with :
91- credentials_json : ' ${{ secrets.GCP_SERVICE_ACCOUNT_TAS_RUNTIME_BUILD_IMAGE_READER }}'
92- - name : Configure Docker to use gcloud
93- run : |
94- gcloud auth configure-docker us-central1-docker.pkg.dev
95- docker pull "$BUILD_IMAGE"
102+ name : repo
96103 - run : |
97- tar -xzvf repo-artifact.tar.gz
98- tar -xzvf ci-artifact.tar.gz
104+ tar -xzvf repo-artifact.tar.gz
105+ tar -xzvf ci-artifact.tar.gz
106+ - name : pull image
107+ run : docker pull "$BUILD_IMAGE"
99108# @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
100109 - name : # @ "{}-mysql".format(package.name)
101110 env :
@@ -106,26 +115,19 @@ jobs:
106115# @ end
107116 test-repos-withoutdb :
108117 runs-on : ubuntu-latest
109- needs : repo-clone
118+ needs : [ repo-clone, determine-image-tag]
110119 env :
111- BUILD_IMAGE : us-central1-docker.pkg.dev/app-runtime-platform-wg/dockerhub-mirror/ cloudfoundry/tas-runtime-build
120+ BUILD_IMAGE : cloudfoundry/tas-runtime-build:${{ needs.determine-image-tag.outputs.go_version }}
112121 steps :
113122 - name : Download artifact
114123 uses : actions/download-artifact@v4
115124 with :
116- name : repo
117- - name : Authenticate with GCP
118- uses : google-github-actions/auth@v2
119- with :
120- credentials_json : ' ${{ secrets.GCP_SERVICE_ACCOUNT_TAS_RUNTIME_BUILD_IMAGE_READER }}'
121- - name : Configure Docker to use gcloud
122- run : |
123- gcloud auth configure-docker us-central1-docker.pkg.dev
124- docker pull "$BUILD_IMAGE"
125-
125+ name : repo
126126 - run : |
127- tar -xzvf repo-artifact.tar.gz
128- tar -xzvf ci-artifact.tar.gz
127+ tar -xzvf repo-artifact.tar.gz
128+ tar -xzvf ci-artifact.tar.gz
129+ - name : pull image
130+ run : docker pull "$BUILD_IMAGE"
129131# @ for package in helpers.packages_without_configure_db(data.values.internal_repos):
130132 - name : # @ package.name
131133 env :
@@ -136,59 +138,47 @@ jobs:
136138# @ end
137139 test-on-postgres :
138140 runs-on : ubuntu-latest
139- needs : repo-clone
141+ needs : [ repo-clone, determine-image-tag]
140142 env :
141- BUILD_IMAGE : us-central1-docker.pkg.dev/app-runtime-platform-wg/dockerhub-mirror/ cloudfoundry/tas-runtime-postgres
143+ BUILD_IMAGE : cloudfoundry/tas-runtime-postgres:${{ needs.determine-image-tag.outputs.go_version }}
142144 steps :
143145 - name : Download artifact
144146 uses : actions/download-artifact@v4
145147 with :
146- name : repo
147- - name : Authenticate with GCP
148- uses : google-github-actions/auth@v2
149- with :
150- credentials_json : ' ${{ secrets.GCP_SERVICE_ACCOUNT_TAS_RUNTIME_BUILD_IMAGE_READER }}'
151- - name : Configure Docker to use gcloud
152- run : |
153- gcloud auth configure-docker us-central1-docker.pkg.dev
154- docker pull "$BUILD_IMAGE"
148+ name : repo
155149 - run : |
156- tar -xzvf repo-artifact.tar.gz
157- tar -xzvf ci-artifact.tar.gz
150+ tar -xzvf repo-artifact.tar.gz
151+ tar -xzvf ci-artifact.tar.gz
152+ - name : pull image
153+ run : docker pull "$BUILD_IMAGE"
158154# @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
159- - name : # @ "{}-mysql ".format(package.name)
155+ - name : # @ "{}-postgres ".format(package.name)
160156 env :
161157 DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
162158 DB : postgres
163159 run : |
164160 ./repo/.github/helpers/test.bash ${{ github.workspace }} "$BUILD_IMAGE"
165- # @ end
161+ # @ end
166162 test-on-mysql-8-0 :
167163 runs-on : ubuntu-latest
168- needs : repo-clone
164+ needs : [ repo-clone, determine-image-tag]
169165 env :
170- BUILD_IMAGE : us-central1-docker.pkg.dev/app-runtime-platform-wg/dockerhub-mirror/ cloudfoundry/tas-runtime-mysql-8.0
166+ BUILD_IMAGE : cloudfoundry/tas-runtime-mysql-8.0:${{ needs.determine-image-tag.outputs.go_version }}
171167 steps :
172168 - name : Download artifact
173169 uses : actions/download-artifact@v4
174170 with :
175- name : repo
176- - name : Authenticate with GCP
177- uses : google-github-actions/auth@v2
178- with :
179- credentials_json : ' ${{ secrets.GCP_SERVICE_ACCOUNT_TAS_RUNTIME_BUILD_IMAGE_READER }}'
180- - name : Configure Docker to use gcloud
181- run : |
182- gcloud auth configure-docker us-central1-docker.pkg.dev
183- docker pull "$BUILD_IMAGE"
171+ name : repo
184172 - run : |
185- tar -xzvf repo-artifact.tar.gz
186- tar -xzvf ci-artifact.tar.gz
173+ tar -xzvf repo-artifact.tar.gz
174+ tar -xzvf ci-artifact.tar.gz
175+ - name : pull image
176+ run : docker pull "$BUILD_IMAGE"
187177# @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
188178 - name : # @ "{}-mysql".format(package.name)
189179 env :
190180 DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
191181 DB : mysql
192182 run : |
193183 ./repo/.github/helpers/test.bash ${{ github.workspace }} "$BUILD_IMAGE"
194- # @ end
184+ # @ end
0 commit comments