-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 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,30 @@ | ||
--- | ||
|
||
on: | ||
push: | ||
tags: | ||
|
||
jobs: | ||
########################### | ||
# BUILD & PUBLISH STAGE | ||
########################### | ||
test-kotlin: | ||
runs-on: infra1-small | ||
if: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: kotlin-build | ||
path: .gradle | ||
- name: Get Tag Name | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: Publish to Nexus and to GitLab with Gradle Wrapper | ||
env: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
GITLAB_PACKAGES_UPLOAD_TOKEN: ${{ secrets.GITLAB_PACKAGES_UPLOAD_TOKEN }} | ||
run: | | ||
export GRADLE_USER_HOME=`pwd`/.gradle | ||
./gradlew -Pversion=$TAG_NAME publish --info |
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,64 @@ | ||
--- | ||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
########################### | ||
# COMPLIANCE CHECK STAGE | ||
########################### | ||
compliance-check: | ||
runs-on: infra1-small | ||
container: | ||
image: '020413372491.dkr.ecr.us-east-1.amazonaws.com/infra/compliance-check:latest' | ||
env: | ||
GITLAB_API_PRIVATE_TOKEN: ${{ secrets.GITLAB_API_PRIVATE_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
echo "Running compliance check in enforcing mode..." | ||
/scripts/gitlab.sh | ||
########################### | ||
# BUILD STAGE | ||
########################### | ||
build-kotlin: | ||
runs-on: infra1-small | ||
needs: compliance-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: kotlin-build | ||
path: .gradle | ||
- run: | | ||
export GRADLE_USER_HOME=`pwd`/.gradle | ||
./gradlew clean build compileTestKotlin -x test --info | ||
- name: Archive build outputs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifact | ||
path: '**/build/**/*' | ||
|
||
########################### | ||
# TEST STAGE | ||
########################### | ||
test-kotlin: | ||
runs-on: infra1-small | ||
needs: build-kotlin | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: kotlin-build | ||
path: .gradle | ||
- run: | | ||
export GRADLE_USER_HOME=`pwd`/.gradle | ||
./gradlew test --info | ||
- name: Archive test outputs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-artifact | ||
path: '**/build/test-results/**/TEST-*.xml' |