File tree Expand file tree Collapse file tree 7 files changed +41
-4
lines changed
Expand file tree Collapse file tree 7 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 1515
1616 continuous-integration :
1717 runs-on : ubuntu-latest
18+ permissions :
19+ contents : write
1820 steps :
1921
2022 - name : " Checkout repository"
Original file line number Diff line number Diff line change 1010jobs :
1111 fetch-dependency-versions :
1212 runs-on : ubuntu-latest
13+ permissions :
14+ contents : none
1315 outputs :
1416 versions : ${{ steps.fetch-versions.outputs.VERSIONS }}
1517
7577 matrix :
7678 version : ${{ fromJson(needs.fetch-dependency-versions.outputs.versions) }}
7779 continue-on-error : true
80+ permissions :
81+ contents : read
7882 steps :
7983 - name : " Checkout repository"
8084 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 77
88jobs :
99 deploy-snapshot :
10- name : Deploy Snapshot
10+ name : " Deploy Snapshot"
1111 runs-on : ubuntu-latest
1212 timeout-minutes : 15
13+ permissions :
14+ contents : read
1315 steps :
1416 - name : " Checkout Repository"
1517 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1010
1111jobs :
1212 end-to-end-tests :
13+ permissions :
14+ contents : read
1315 strategy :
1416 fail-fast : false
1517 matrix :
4143 - name : " Run tests"
4244 id : run_tests
4345 run : |
46+ if [ "${{ matrix.environment }}" = "canary" ]; then
47+ export AICORE_SERVICE_KEY="${{ secrets.AI_CORE_CANARY }}"
48+ else
49+ export AICORE_SERVICE_KEY="${{ secrets.AI_CORE_PRODUCTION }}"
50+ fi
51+
4452 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} surefire:test -pl :spring-app -DskipTests=false"
4553 mvn $MVN_ARGS "-Daicore.landscape=${{ matrix.environment }}" | tee mvn_output.log # tee writes to both the console and a file
4654
@@ -60,10 +68,17 @@ jobs:
6068 fi
6169 env :
6270 # See "End-to-end test application instructions" on the README.md to update the secret
63- AICORE_SERVICE_KEY : ${{ secrets[matrix.secret-name] }}
71+ AI_CORE_PRODUCTION : ${{ secrets.production }}
72+ AI_CORE_CANARY : ${{ secrets.canary }}
6473
6574 - name : " Start Application Locally"
6675 run : |
76+ if [ "${{ matrix.environment }}" = "canary" ]; then
77+ export AICORE_SERVICE_KEY="${{ secrets.AI_CORE_CANARY }}"
78+ else
79+ export AICORE_SERVICE_KEY="${{ secrets.AI_CORE_PRODUCTION }}"
80+ fi
81+
6782 cd sample-code/spring-app
6883 mvn spring-boot:run &
6984 timeout=15
7792 done
7893 env :
7994 # See "End-to-end test application instructions" on the README.md to update the secret
80- AICORE_SERVICE_KEY : ${{ secrets[matrix.secret-name] }}
95+ AI_CORE_PRODUCTION : ${{ secrets.production }}
96+ AI_CORE_CANARY : ${{ secrets.canary }}
8197
8298 - name : " Health Check"
8399 # print response body with headers to stdout. q:body only O:print -:stdout S:headers
Original file line number Diff line number Diff line change 1313
1414jobs :
1515 create_fosstars_report :
16- runs-on : ubuntu-latest
1716 name : " Security rating"
17+ runs-on : ubuntu-latest
18+ permissions :
19+ contents : read
1820 steps :
1921 - name : " Checkout repository"
2022 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 2828 release-commit : ${{ steps.prepare-release.outputs.RELEASE_COMMIT_ID }}
2929 release-tag : ${{ steps.prepare-release.outputs.TAG_NAME }}
3030 runs-on : ubuntu-latest
31+ permissions :
32+ contents : write
3133 steps :
3234 - name : " Checkout Repository"
3335 uses : actions/checkout@v4
@@ -155,6 +157,9 @@ jobs:
155157 outputs :
156158 pr-url : ${{ steps.create-release-notes-pr.outputs.PR_URL }}
157159 runs-on : ubuntu-latest
160+ permissions :
161+ contents : write
162+ pull-requests : write
158163 steps :
159164 - name : " Checkout Code Repository"
160165 uses : actions/checkout@v4
@@ -233,6 +238,9 @@ jobs:
233238 outputs :
234239 pr-url : ${{ steps.create-code-pr.outputs.PR_URL }}
235240 runs-on : ubuntu-latest
241+ permissions :
242+ contents : write
243+ pull-requests : write
236244 steps :
237245 - name : " Checkout Repository"
238246 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 77jobs :
88 update-all-specs :
99 runs-on : ubuntu-latest
10+ permissions :
11+ contents : write
12+ pull-requests : write
1013
1114 strategy :
1215 matrix :
You can’t perform that action at this time.
0 commit comments