-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OZ-438: Build, test and deploy using GitHub Actions
- Loading branch information
1 parent
8c2c422
commit 9a8421d
Showing
3 changed files
with
60 additions
and
2 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,45 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
validate: | ||
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main | ||
secrets: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
|
||
spotless: | ||
needs: validate | ||
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-spotless-check.yml@main | ||
|
||
pre-release: | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
needs: spotless | ||
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main | ||
secrets: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
|
||
release: | ||
if: ${{ github.event_name == 'release' }} | ||
needs: spotless | ||
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main | ||
secrets: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
|
||
# this job notifies OCD3 of a new pre-release(snapshots) | ||
notify-ocd3: | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
needs: pre-release | ||
uses: mekomsolutions/shared-github-workflow/.github/workflows/ocd3-notify.yml@main | ||
secrets: | ||
OCD3_USERNAME: ${{ secrets.OCD3_USERNAME }} | ||
OCD3_PASSWORD: ${{ secrets.OCD3_PASSWORD }} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
version: 1 | ||
build: | ||
# Unable to run tests because of no Docker agent available in OCD3 yet. https://mekomsolutions.atlassian.net/browse/INFRA-318 | ||
bash_commands: "mvn clean install -DskipTests" | ||
bash_commands: "echo 'Build is handled by GitHub Actions. Skipping...' && exit 0" | ||
deploy: | ||
bash_commands: "mvn clean deploy -DskipTests -DaltDeploymentRepository=mks-nexus::default::https://nexus.mekomsolutions.net/repository/maven-snapshots" | ||
bash_commands: "echo 'Publishing is handled by GitHub Actions. Skipping...' && exit 0" |
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