-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLUEBUTTON-1787: GitHub Actions CI for Java and Terraform development (…
…#209) * Add GitHub Actions workflows for Java and Terraform development, add user for S3 ITs * Add linting job to Java CI via fmt-maven-plugin * Make maven jobs more DRY via matrix builds
- Loading branch information
Nathan Dister
authored
Feb 6, 2020
1 parent
8dd9827
commit 8788ce4
Showing
4 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
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,44 @@ | ||
name: 'CI - Java' | ||
on: | ||
pull_request: | ||
paths: | ||
- apps/** | ||
jobs: | ||
mvn-job: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java_version: [1.8] | ||
mvn_command: ['verify', 'com.coveo:fmt-maven-plugin:check'] | ||
steps: | ||
- name: 'Configure AWS credentials' | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.GA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
- name: 'Checkout repo' | ||
uses: actions/checkout@v2 | ||
- name: 'Setup JDK' | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java_version }} | ||
- name: 'Generate maven toolchain config' | ||
run: | | ||
cat << EOF > ~/.m2/toolchains.xml | ||
<toolchains> | ||
<toolchain> | ||
<type>jdk</type> | ||
<provides> | ||
<version>${{ matrix.java_version }}</version> | ||
<vendor>OpenJDK</vendor> | ||
</provides> | ||
<configuration> | ||
<jdkHome>$JAVA_HOME</jdkHome> | ||
</configuration> | ||
</toolchain> | ||
</toolchains> | ||
EOF | ||
- name: 'Run maven ${{ matrix.mvn_commmand }}' | ||
run: mvn ${{ matrix.mvn_command }} | ||
working-directory: ./apps |
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,31 @@ | ||
name: 'CI - Terraform' | ||
on: | ||
pull_request: | ||
paths: | ||
- ops/terraform/** | ||
jobs: | ||
tf-validate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tf_version: [0.12.8] | ||
tf_environment: [test, prod-sbx, prod, mgmt] | ||
tf_resources: [stateless, stateful] | ||
steps: | ||
- name: 'Checkout repo' | ||
uses: actions/checkout@v2 | ||
- name: 'Run terraform init' | ||
uses: hashicorp/terraform-github-actions@master | ||
with: | ||
tf_actions_version: ${{ matrix.tf_version }} | ||
tf_actions_subcommand: init | ||
tf_actions_working_dir: ./ops/terraform/env/${{ matrix.tf_environment }}/${{ matrix.tf_resources }}/ | ||
tf_actions_comment: false | ||
args: '-backend=false' | ||
- name: 'Run terraform validate' | ||
uses: hashicorp/terraform-github-actions@master | ||
with: | ||
tf_actions_version: ${{ matrix.tf_version }} | ||
tf_actions_subcommand: validate | ||
tf_actions_working_dir: ./ops/terraform/env/${{ matrix.tf_environment }}/${{ matrix.tf_resources }}/ | ||
tf_actions_comment: false |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.* | ||
!.gitignore | ||
!.gitattributes | ||
!.github | ||
|
||
# OSX system files | ||
.DS_Store |
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