-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update build to use GH actions, add test
- Loading branch information
1 parent
06c538c
commit 1b018b0
Showing
8 changed files
with
234 additions
and
116 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 @@ | ||
name: maven branch release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: build with maven | ||
run: | | ||
mvn -B -s settings.xml \ | ||
build-helper:parse-version \ | ||
-DbranchName='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}' \ | ||
-DdevelopmentVersion='${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0-SNAPSHOT' \ | ||
release:branch | ||
env: | ||
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | ||
ARTIFACTORY_API_USERNAME: ${{ vars.ARTIFACTORY_API_USERNAME }} | ||
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} | ||
ARTIFACTORY_SNAPSHOT_URL: ${{ vars.ARTIFACTORY_SNAPSHOT_URL }} | ||
ARTIFACTORY_RELEASE_URL: ${{ vars.ARTIFACTORY_RELEASE_URL }} |
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,37 @@ | ||
name: maven build | ||
|
||
on: | ||
push: | ||
branches: [ "**" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: build with maven | ||
run: mvn -B -s settings.xml clean deploy -Pdep-check | ||
env: | ||
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | ||
ARTIFACTORY_API_USERNAME: ${{ vars.ARTIFACTORY_API_USERNAME }} | ||
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} | ||
ARTIFACTORY_SNAPSHOT_URL: ${{ vars.ARTIFACTORY_SNAPSHOT_URL }} | ||
ARTIFACTORY_RELEASE_URL: ${{ vars.ARTIFACTORY_RELEASE_URL }} | ||
- name: notify dependencies | ||
run: | | ||
set -ex | ||
mvn dependency:list | grep 'SNAPSHOT:compile' > dependencies.txt || true | ||
mvn -q -Dexec.executable='echo' -Dexec.args='${project.groupId}:${project.artifactId}:${project.packaging}:${project.version}' exec:exec | grep :jar: > artifacts.txt | ||
echo "{\"event_type\":\"update-dependencies\",\"client_payload\":{\"project\":\"${{ github.event.repository.name }}:${{ github.head_ref || github.ref_name }}\",\"artifacts\":\"$( cat artifacts.txt | awk -v ORS='\\n' '1' )\",\"dependencies\":\"$( cat dependencies.txt | awk -v ORS='\\n' '1' )\"}}" > dependency-action.json | ||
curl -n "https://api.github.com/repos/CI-CMG/maven-dependency-build/dispatches" \ | ||
--header 'Accept: application/vnd.github+json' \ | ||
--header "Authorization: token ${{ secrets.RELEASE_PAT }}" \ | ||
--data @dependency-action.json |
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,33 @@ | ||
name: maven tag release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: set up git | ||
run: git config --global user.email [email protected] && git config --global user.name 'Bloopy McBloopFace' | ||
- name: build with maven | ||
run: | | ||
mvn -B -s settings.xml \ | ||
build-helper:parse-version \ | ||
-Dresume=false -Dtag='v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}' \ | ||
-DreleaseVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}' \ | ||
-DdevelopmentVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT' \ | ||
release:prepare release:perform | ||
env: | ||
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | ||
ARTIFACTORY_API_USERNAME: ${{ vars.ARTIFACTORY_API_USERNAME }} | ||
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} | ||
ARTIFACTORY_SNAPSHOT_URL: ${{ vars.ARTIFACTORY_SNAPSHOT_URL }} | ||
ARTIFACTORY_RELEASE_URL: ${{ vars.ARTIFACTORY_RELEASE_URL }} |
Oops, something went wrong.