Skip to content

Commit

Permalink
[HNC-578] - Create process for Pentaho CUST case builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cardosov committed Mar 13, 2024
1 parent f8a270c commit b065aef
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ on:
required: false
type: string
description: "For PDI plugin integration tests, path to the json file containing test scenarios for each plugin"
run_snapshot:
required: true
type: boolean
default: true
description: 'should the snapshot build run'
run_versioning:
required: true
type: boolean
default: true
description: 'should the versioning run on the RC build'

env:
VERSION: "${{ inputs.version }}"
Expand Down Expand Up @@ -122,6 +132,7 @@ jobs:
cp "${{ steps.common-maven.outputs.settings-file-path }}" /root/.m2
snapshot:
if: ${{ inputs.run_snapshot == 'true' }}
name: Update Snapshots
needs: setup-maven-settings

Expand Down Expand Up @@ -191,10 +202,14 @@ jobs:
- name: Determine version
id: version
run: |
version="${{ env.VERSION }}-${{ github.run_number }}"
version="${{ env.VERSION }}"
if [[ "${{ inputs.run_versioning}}" == "true" ]]; then
version="${version}-${{ github.run_number }}"
fi
echo "current-version=$version" >> $GITHUB_OUTPUT
- name: Version set
if: ${{ inputs.run_snapshot == 'true' }}
run: |
sed -i 's/BASE_VERSION/${{ env.BASE_VERSION }}/g' .github/release-versions.properties
sed -i 's/BUILD_NBR/${{ github.run_number }}/g' .github/release-versions.properties
Expand Down Expand Up @@ -256,22 +271,24 @@ jobs:
- name: Create artifacts download links
shell: bash
run: |
jf config add artifactory --interactive=false --enc-password=false --basic-auth-only \
--artifactory-url ${{ env.ARTIFACTORY_BASE_URL }} \
--password ${{ env.NEXUS_DEPLOY_PASSWORD }} \
--user ${{ env.NEXUS_DEPLOY_USER }}
resp=$(jf rt search --props "build.name=${{ env.BUILD_NAME }};build.number=${{ github.run_number }}" \
"*-${{ steps.version.outputs.current-version }}.zip")
echo "| :gift: Files |" >> $GITHUB_STEP_SUMMARY
echo "|:----:|" >> $GITHUB_STEP_SUMMARY
echo "$resp" | jq -r '.[].path' | while read -r path; do
link_text=$(echo "$path" | sed 's/.*\///')
echo "| [ $link_text ](${{ env.ARTIFACTORY_BASE_URL }}/$path) |" >> $GITHUB_STEP_SUMMARY;
done
# jf config add artifactory --interactive=false --enc-password=false --basic-auth-only \
# --artifactory-url ${{ env.ARTIFACTORY_BASE_URL }} \
# --password ${{ env.NEXUS_DEPLOY_PASSWORD }} \
# --user ${{ env.NEXUS_DEPLOY_USER }}
#
# resp=$(jf rt search --props "build.name=${{ env.BUILD_NAME }};build.number=${{ github.run_number }}" \
# "*-${{ steps.version.outputs.current-version }}.zip")
#
# echo "| :gift: Files |" >> $GITHUB_STEP_SUMMARY
# echo "|:----:|" >> $GITHUB_STEP_SUMMARY
#
# echo "$resp" | jq -r '.[].path' | while read -r path; do
# link_text=$(echo "$path" | sed 's/.*\///')
# echo "| [ $link_text ](${{ env.ARTIFACTORY_BASE_URL }}/$path) |" >> $GITHUB_STEP_SUMMARY;
# done

# TODO: Jfrog's build-info pmaven plugin needs to be added to root POM

echo "|[Full artifacts list](${{ env.ARTIFACTORY_HOST }}/ui/builds/${{ env.BUILD_NAME }}/${{ github.run_number }})|" >> $GITHUB_STEP_SUMMARY

- name: Report notifications
Expand Down

0 comments on commit b065aef

Please sign in to comment.