diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e0fa773..1ac6c31 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -161,136 +161,136 @@ jobs: env: cmd_type: BUILD - release-candidate: - name: Build Release Candidate - needs: setup-maven-settings - - runs-on: [ k8s ] - - env: - JFROG_CLI_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - - container: - image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20231226.106 - credentials: - username: ${{ secrets.PENTAHO_CICD_ONE_USER }} - password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} - volumes: - - /home/runner/caches/pentaho/.m2:/root/.m2 - steps: - - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - - - name: Determine which changes occurred - if: ${{ inputs.modules_to_build == '' }} - id: change_detection - uses: hv-actions/change-detection-builder@stable - - - name: Determine version - id: version - run: | - version="${{ env.VERSION }}-${{ github.run_number }}" - echo "current-version=$version" >> $GITHUB_OUTPUT - - - name: Version set - 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 + # release-candidate: + # name: Build Release Candidate + # needs: setup-maven-settings + + # runs-on: [ k8s ] + + # env: + # JFROG_CLI_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + # container: + # image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20231226.106 + # credentials: + # username: ${{ secrets.PENTAHO_CICD_ONE_USER }} + # password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} + # volumes: + # - /home/runner/caches/pentaho/.m2:/root/.m2 + # steps: + + # - name: Checkout code + # uses: actions/checkout@v3 + # with: + # fetch-depth: 0 + + # - run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} + + # - name: Determine which changes occurred + # if: ${{ inputs.modules_to_build == '' }} + # id: change_detection + # uses: hv-actions/change-detection-builder@stable + + # - name: Determine version + # id: version + # run: | + # version="${{ env.VERSION }}-${{ github.run_number }}" + # echo "current-version=$version" >> $GITHUB_OUTPUT + + # - name: Version set + # 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 - java -DRELEASE_MODE=true -jar /version-merger.jar . \ - -f .github/release-versions.properties \ - commit project.revision=${{ steps.version.outputs.current-version }} \ - project.version=${{ steps.version.outputs.current-version }} \ - version=${{ steps.version.outputs.current-version }} \ - distribution.version=${{ steps.version.outputs.current-version }} \ - project.stage=master - - - name: Build code and deploy artifacts - uses: lumada-common-services/gh-composite-actions@stable - with: - command: | - mvn clean deploy -DskipTests \ - -Pcicd-release -Drelease -Dbuild.name=${{ env.BUILD_NAME }} -Dbuild.number=${{ github.run_number }} \ - -pl "${{ inputs.modules_to_build || format('{0},{1}', inputs.modules_to_always_build, steps.change_detection.outputs.changed_modules) }}" \ - -amd ${{ inputs.additional_mvn_directives }} - env: - cmd_type: BUILD - - - name: Run unit-tests - uses: lumada-common-services/gh-composite-actions@stable - with: - command: | - mvn verify -B -Daudit \ - -pl "${{ inputs.modules_to_build || format('{0},{1}', inputs.modules_to_always_build, steps.change_detection.outputs.changed_modules) }}" \ - -amd - env: - cmd_type: UNIT_TEST - reporter: 'java-junit' - fail-on-error: 'true' - test_report_path: '**/target/surefire-reports/*.xml' - - - name: Run PDI plugin integration tests - uses: pentaho/actions-common@stable - if: ${{ inputs.test_scenario_json }} - with: - changed_modules: "${{ steps.change_detection.outputs.changed_modules }}" - test_scenario_json: "${{ inputs.test_scenario_json }}" - env: - run_plugin_integration_tests: true - BASE_VERSION: "${{ inputs.base_version }}" - - #- name: Blackduck Scan - # uses: lumada-common-services/gh-composite-actions@1.2.0 - # env: - # BlackDuck_Project_Version: ${{ steps.version.outputs.current-version }} - # BlackDuck_Project_Name: "${{ inputs.blackduck_project_key }}" - # BlackDuck_Api_Token: "${{ secrets.ORION_BLACKDUCK_TOKEN }}" - # BlackDuck_Url: "${{ inputs.blackduck_server_url }}" - # ADDITIONAL_ARGS: ${{ inputs.blackduck_additional_args }} - - - name: Sonarqube scan - continue-on-error: true - uses: lumada-common-services/gh-composite-actions@stable - env: - sonar_utility: sonar-scanner - sonar_commands: '("-Dsonar.projectKey=${{env.SONAR_PROJECT_KEY}} -Dsonar.host.url=${{env.SONAR_HOST_URL}} -Dsonar.login=${{env.SONAR_LOGIN}}")' - - - name: Tag release - uses: lumada-common-services/gh-composite-actions@stable - env: - Tag_version: "${{ steps.version.outputs.current-version }}" - push_tag_only: true - - - 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 }} + # java -DRELEASE_MODE=true -jar /version-merger.jar . \ + # -f .github/release-versions.properties \ + # commit project.revision=${{ steps.version.outputs.current-version }} \ + # project.version=${{ steps.version.outputs.current-version }} \ + # version=${{ steps.version.outputs.current-version }} \ + # distribution.version=${{ steps.version.outputs.current-version }} \ + # project.stage=master + + # - name: Build code and deploy artifacts + # uses: lumada-common-services/gh-composite-actions@stable + # with: + # command: | + # mvn clean deploy -DskipTests \ + # -Pcicd-release -Drelease -Dbuild.name=${{ env.BUILD_NAME }} -Dbuild.number=${{ github.run_number }} \ + # -pl "${{ inputs.modules_to_build || format('{0},{1}', inputs.modules_to_always_build, steps.change_detection.outputs.changed_modules) }}" \ + # -amd ${{ inputs.additional_mvn_directives }} + # env: + # cmd_type: BUILD + + # - name: Run unit-tests + # uses: lumada-common-services/gh-composite-actions@stable + # with: + # command: | + # mvn verify -B -Daudit \ + # -pl "${{ inputs.modules_to_build || format('{0},{1}', inputs.modules_to_always_build, steps.change_detection.outputs.changed_modules) }}" \ + # -amd + # env: + # cmd_type: UNIT_TEST + # reporter: 'java-junit' + # fail-on-error: 'true' + # test_report_path: '**/target/surefire-reports/*.xml' + + # - name: Run PDI plugin integration tests + # uses: pentaho/actions-common@stable + # if: ${{ inputs.test_scenario_json }} + # with: + # changed_modules: "${{ steps.change_detection.outputs.changed_modules }}" + # test_scenario_json: "${{ inputs.test_scenario_json }}" + # env: + # run_plugin_integration_tests: true + # BASE_VERSION: "${{ inputs.base_version }}" + + # #- name: Blackduck Scan + # # uses: lumada-common-services/gh-composite-actions@1.2.0 + # # env: + # # BlackDuck_Project_Version: ${{ steps.version.outputs.current-version }} + # # BlackDuck_Project_Name: "${{ inputs.blackduck_project_key }}" + # # BlackDuck_Api_Token: "${{ secrets.ORION_BLACKDUCK_TOKEN }}" + # # BlackDuck_Url: "${{ inputs.blackduck_server_url }}" + # # ADDITIONAL_ARGS: ${{ inputs.blackduck_additional_args }} + + # - name: Sonarqube scan + # continue-on-error: true + # uses: lumada-common-services/gh-composite-actions@stable + # env: + # sonar_utility: sonar-scanner + # sonar_commands: '("-Dsonar.projectKey=${{env.SONAR_PROJECT_KEY}} -Dsonar.host.url=${{env.SONAR_HOST_URL}} -Dsonar.login=${{env.SONAR_LOGIN}}")' + + # - name: Tag release + # uses: lumada-common-services/gh-composite-actions@stable + # env: + # Tag_version: "${{ steps.version.outputs.current-version }}" + # push_tag_only: true + + # - 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") + # 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 "| :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 + # 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 - echo "|[Full artifacts list](${{ env.ARTIFACTORY_HOST }}/ui/builds/${{ env.BUILD_NAME }}/${{ github.run_number }})|" >> $GITHUB_STEP_SUMMARY - - - name: Report notifications - if: always() - uses: lumada-common-services/gh-composite-actions@stable - env: - Slack_Token: ${{ secrets.SLACK_TOKEN }} - Slack_Channel: ${{ env.SLACK_CHANNEL }} - report: true + # echo "|[Full artifacts list](${{ env.ARTIFACTORY_HOST }}/ui/builds/${{ env.BUILD_NAME }}/${{ github.run_number }})|" >> $GITHUB_STEP_SUMMARY + + # - name: Report notifications + # if: always() + # uses: lumada-common-services/gh-composite-actions@stable + # env: + # Slack_Token: ${{ secrets.SLACK_TOKEN }} + # Slack_Channel: ${{ env.SLACK_CHANNEL }} + # report: true