ISICO-15554: jettison version update (same as in conductor-custom) #58
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
name: CiscoM31PublishJar | |
on: | |
push: | |
workflow_dispatch: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Gradle wrapper validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up Zulu JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Build with Gradle | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
# as github is not allowing password token to be stored in build files, unable to store conductor-custom deliverables into github packages | |
# hence executing conductor-custom build so that conductor-custom deliverables to be stored in local maven repository | |
echo "############################################################################################################################################" | |
echo "Building conductor custom jars" | |
./.github/workflows/publish_conductor_custom.sh ${{ steps.extract_branch.outputs.branch }} | |
echo "############################################################################################################################################" | |
export CORE_CONDUCTOR_VERSION=$(./gradlew conductor-workflow-event-listener:dependencies | grep conductor-core | grep ">" | tail -1 | cut -d '>' -f 2 | cut -d ' ' -f 2) | |
echo "Building against Conductor core version $CORE_CONDUCTOR_VERSION" | |
./gradlew build --scan -x test | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
comment_on_pr: false | |
files: './**/**/test-results/**/*.xml' | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-artifacts | |
path: '**/build/reports' | |
- name: Store Buildscan URL | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-scan | |
path: 'buildscan.log' | |
- name: Create build tag | |
run: | | |
export CORE_CONDUCTOR_VERSION=$(./gradlew conductor-workflow-event-listener:dependencies | grep conductor-core | grep ">" | tail -1 | cut -d '>' -f 2 | cut -d ' ' -f 2) | |
echo "Tag using Conductor core version $CORE_CONDUCTOR_VERSION" | |
echo "TAG=$CORE_CONDUCTOR_VERSION-build.${{ github.run_number }}+${{ github.sha }}" >> $GITHUB_OUTPUT | |
id: tag | |
- name: Upload conductor-server JAR | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "community-server/build/libs/conductor-community-server-*-boot.jar" | |
commit: ${{ github.sha }} | |
tag: ${{ steps.tag.outputs.TAG }} | |
token: ${{ github.token }} | |