Skip to content

Use different tokens instead of forcing WD and all HMS to use the same delegatetoken in the kerberos environment #709

Use different tokens instead of forcing WD and all HMS to use the same delegatetoken in the kerberos environment

Use different tokens instead of forcing WD and all HMS to use the same delegatetoken in the kerberos environment #709

Workflow file for this run

name: Java CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Package and run all tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Init Coveralls
shell: bash
run: |
COVERALLS_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
if [[ -z "${COVERALLS_TOKEN}" ]];
then
echo "Coveralls token not available"
COVERALLS_SKIP=true
else
echo "Coveralls token available"
COVERALLS_SKIP=false
fi
echo "COVERALLS_SKIP=${COVERALLS_SKIP}" >> $GITHUB_ENV
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
java-package: jdk
server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
# only signed artifacts will be released to maven central. this sets up things for the maven-gpg-plugin
gpg-private-key: ${{ secrets.HCOM_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
# this creates a settings.xml on build server
settings-path: ${{ github.workspace }}
- name: Run Maven Targets
run: mvn deploy jacoco:report coveralls:report --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --activate-profiles coveralls,sonatype-oss-release-github-actions -Dcoveralls.skip=$COVERALLS_SKIP -DrepoToken=${{ secrets.COVERALLS_REPO_TOKEN }}
env:
SONATYPE_PASSWORD: ${{ secrets.HCOM_SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.HCOM_SONATYPE_USERNAME }}
GPG_PASSPHRASE: ${{secrets.HCOM_GPG_PRIVATE_KEY_PASSPHRASE}}