Merge pull request #137 from research-virtualfortknox/snyk-fix-870a1c… #96
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 workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | |
name: Maven Package | |
on: | |
# Trigger the workflow on push only for the master branch | |
push: | |
branches: | |
- master | |
jobs: | |
build_java_8: | |
environment: MSB_1.5 | |
env: | |
MSB_WEBSOCKET_INTERFACE_URL: ${{ secrets.MSB_WEBSOCKET_INTERFACE_URL }} | |
MSB_SMARTOBJECTMGMT_URL: ${{ secrets.MSB_SMARTOBJECTMGMT_URL }} | |
MSB_INTEGRATIONDESIGNMGMT_URL: ${{ secrets.MSB_INTEGRATIONDESIGNMGMT_URL }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Build with Maven | |
run: mvn -B -DMSB_WEBSOCKET_INTERFACE_URL=$MSB_WEBSOCKET_INTERFACE_URL -DMSB_SMARTOBJECTMGMT_URL=$MSB_SMARTOBJECTMGMT_URL -DMSB_INTEGRATIONDESIGNMGMT_URL=$MSB_INTEGRATIONDESIGNMGMT_URL install --file pom.xml | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn deploy -DskipTests -P default -s $GITHUB_WORKSPACE/settings.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
build_java_11: | |
environment: MSB_1.6 | |
env: | |
MSB_WEBSOCKET_INTERFACE_URL: ${{ secrets.MSB_WEBSOCKET_INTERFACE_URL }} | |
MSB_SMARTOBJECTMGMT_URL: ${{ secrets.MSB_SMARTOBJECTMGMT_URL }} | |
MSB_INTEGRATIONDESIGNMGMT_URL: ${{ secrets.MSB_INTEGRATIONDESIGNMGMT_URL }} | |
TESTENV_USERNAME: ${{ secrets.TESTENV_USERNAME }} | |
TESTENV_PASSWORD: ${{ secrets.TESTENV_PASSWORD }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Build with Maven | |
run: mvn -B -DMSB_WEBSOCKET_INTERFACE_URL=$MSB_WEBSOCKET_INTERFACE_URL -DMSB_SMARTOBJECTMGMT_URL=$MSB_SMARTOBJECTMGMT_URL -DMSB_INTEGRATIONDESIGNMGMT_URL=$MSB_INTEGRATIONDESIGNMGMT_URL -DTESTENV_USERNAME=$TESTENV_USERNAME -DTESTENV_PASSWORD=$TESTENV_PASSWORD clean org.jacoco:jacoco-maven-plugin:prepare-agent install -q org.jacoco:jacoco-maven-plugin:report -Pcoverage --file pom.xml | |
- name: Build Sonar Report | |
run: mvn sonar:sonar -Dsonar.projectKey=research-virtualfortknox_msb-client-websocket-java --file pom.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Build Codecov Report | |
run: bash <(curl -s https://codecov.io/bash) | |
- name: Build Coveralls Report | |
run: mvn test jacoco:report coveralls:report -DrepoToken=$COVERALLS_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} |