-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JPERF-831 Migrate CI from CircleCI to Github Actions. Change the pipe…
…line config to use IAM role and OIDC token for assuming an identity on AWS. This change allows getting rid of the access key and secret. While applying changes I ran into a problem where some ubuntu images were not available on a particular AWS region. To fix that I had to bump both aws-resources and aws-infrastructure and some other required dependencies.
- Loading branch information
Showing
10 changed files
with
214 additions
and
163 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Build and test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Compile | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: wrapper | ||
arguments: compileTestKotlin | ||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
- name: Upload test reports | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-reports | ||
path: ./build/reports/tests | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-results | ||
path: ./build/test-results | ||
build-check: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- run: echo "All build jobs successful." | ||
test-integration: | ||
runs-on: ubuntu-latest | ||
needs: build-check | ||
env: | ||
JIRA_LICENSE: '${{ secrets.JIRA_LICENSE }}' | ||
TERM: dumb | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Prepare Jira license | ||
run: echo $JIRA_LICENSE > jira-license.txt | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
aws-region: eu-west-1 | ||
role-duration-seconds: 14400 | ||
- name: Generate workflow URL | ||
run: echo "WORKFLOW_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV | ||
- name: Test integration | ||
uses: gradle/gradle-build-action@v2 | ||
continue-on-error: true # expect it to sometimes flake | ||
with: | ||
gradle-version: wrapper | ||
arguments: testIntegration | ||
env: | ||
USER: ${{ env.WORKFLOW_URL }} | ||
- name: Test integration # if the last run was green, this should be quick, expect the rerun to be green | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: testIntegration | ||
env: | ||
USER: ${{ env.WORKFLOW_URL }} | ||
- name: Upload test reports | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-reports | ||
path: ./build/reports/tests | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-results | ||
path: ./build/test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.