From ff2d07db23e04784a479e33f06ba9688934cf32e Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:14:21 -0500 Subject: [PATCH 1/7] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 803eca1..4fcf5a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Workflow run-name: 'Build Workflow -- ${{ github.head_ref || github.ref_name }}' -# Pipeline/Workflow Triggers for the test demo +# Pipeline/Workflow Triggers on: push: pull_request: From 1cc27c219aec97a4e368c701293b457ca60ca2e5 Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:30:06 -0500 Subject: [PATCH 2/7] Update code_coverage.yaml --- .github/workflows/code_coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index 7e598ac..f04e5ee 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -31,7 +31,7 @@ jobs: branch_name: ${{env.BRANCH_NAME}} - name: IKMDEV Code Coverage - uses: ikmdev/maven-code-coverage-action@main + uses: casaras1/maven-code-coverage-action@main with: repo_name: ${{github.event.workflow_run.head_repository.full_name}} branch_name: ${{github.event.workflow_run.head_branch}} From 14565c7d80f4ba4779cc2deb38cf06de2208b9fb Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:41:08 -0500 Subject: [PATCH 3/7] Delete .github/workflows/release versioning.yml --- .github/workflows/release versioning.yml | 191 ----------------------- 1 file changed, 191 deletions(-) delete mode 100644 .github/workflows/release versioning.yml diff --git a/.github/workflows/release versioning.yml b/.github/workflows/release versioning.yml deleted file mode 100644 index f596009..0000000 --- a/.github/workflows/release versioning.yml +++ /dev/null @@ -1,191 +0,0 @@ -name: Release Versioning Workflow - -run-name: "Releasing ${{ github.event.repository.name }} #${{github.run_number}}" - -# Trigger workflow manually -on: - workflow_dispatch: - inputs: - action: - type: choice - description: Version To Increment (If Custom, Please Input Release or Development Version Below) - options: - - Major - - Minor - - Patch - - Custom - required: true - - release_version: - type: string - description: Name of release. May follow SemVer (Major.Minor.Patch) format - - development_version: - type: string - description: Name of next development version. Must follow SemVer + "-" + (Major.Minor.Patch-TEXT) format - -# Define environment parameters -env: - ACTION_INPUT: ${{github.event.inputs.action}} - DEVELOPMENT_VERSION_INPUT: ${{github.event.inputs.development_version}} - RELEASE_VERSION_INPUT: ${{github.event.inputs.release_version}} - -# Define jobs within the workflow -jobs: - get_current_version: - runs-on: ubuntu-latest - name: Get Current Version - outputs: - CURRENT_RELEASE_VERSION: ${{steps.splitVersion.outputs._0}} - - steps: - - name: Stops If Fields Are Empty - if: env.ACTION_INPUT == 'Custom' && env.DEVELOPMENT_VERSION_INPUT == '' && env.RELEASE_VERSION_INPUT == '' - run: | - echo "Please Enter A Development Or Release Version" - exit 1 - - - name: Stop if Development input is empty - if: env.ACTION_INPUT == 'Custom' && env.DEVELOPMENT_VERSION_INPUT == '' - run: | - echo "Please Enter A Development Version" - exit 1 - - - name: Checkout Code Repository - uses: actions/checkout@v4 - - - name: Downloading Java - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'adopt' - - - name: Get Current POM Version - id: getPOMVersion - run: echo "POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - - - name: Print Version - run: echo ${{steps.getPOMVersion.outputs.POM_VERSION}} - - - name: Split version code - uses: xom9ikk/split@v1.1 - id: splitVersion - with: - string: ${{steps.getPOMVersion.outputs.POM_VERSION}} - separator: -SNAPSHOT - limit: -1 - - - get_custom_inputs: - runs-on: ubuntu-latest - - name: Get Custom Inputs - needs: get_current_version - if: github.event.inputs.action == 'Custom' - outputs: - SNAPSHOT_VERSION: ${{steps.setOutputs.outputs.SNAPSHOT_VERSION}} - RELEASE_VERSION: ${{steps.setOutputs.outputs.RELEASE_VERSION}} - - env: - CUSTOM_SNAPSHOT_VERSION: ${{github.event.inputs.development_version}}-SNAPSHOT - - steps: - - name: If Development Version contains SNAPSHOT - if: contains(env.DEVELOPMENT_VERSION_INPUT, '-SNAPSHOT') - run: echo "CUSTOM_SNAPSHOT_VERSION=${{env.DEVELOPMENT_VERSION_INPUT}}" >> $GITHUB_ENV - - - name: Set Ouputs - id: setOutputs - run: | - echo "SNAPSHOT_VERSION=${{env.CUSTOM_SNAPSHOT_VERSION}}" >> $GITHUB_OUTPUT - echo "RELEASE_VERSION=${{env.RELEASE_VERSION_INPUT || needs.get_current_version.outputs.CURRENT_RELEASE_VERSION}}" >> $GITHUB_OUTPUT - - - call_release_workflow_with_custom_inputs: - needs: get_custom_inputs - name: Call Release Workflow With Custom Inputs - uses: ikmdev/Demo_Java_Maven/.github/workflows/reusable_release_workflow.yaml@main - permissions: write-all - secrets: inherit - with: - snapshot_version: ${{needs.get_custom_inputs.outputs.SNAPSHOT_VERSION}} - release_version: ${{needs.get_custom_inputs.outputs.RELEASE_VERSION}} - - - get_major_minor_patch_inputs: - runs-on: ubuntu-latest - - name: Get Major, Minor or Patch Input - if: github.event.inputs.action != 'Custom' - needs: get_current_version - outputs: - RELEASE_VERSION: ${{needs.get_current_version.outputs.CURRENT_RELEASE_VERSION}} - _MAJOR: ${{steps.splitVersionSemVer.outputs._0}} - _MINOR: ${{steps.splitVersionSemVer.outputs._1}} - _PATCH: ${{steps.splitVersionSemVer.outputs._2}} - - steps: - - name: Split version code - SemVer - uses: xom9ikk/split@v1.1 - id: splitVersionSemVer - with: - string: ${{needs.get_current_version.outputs.CURRENT_RELEASE_VERSION}} - separator: . - limit: -1 - - - increment_version: - runs-on: ubuntu-latest - needs: get_major_minor_patch_inputs - outputs: - NEXT_SNAPSHOT_VERSION: ${{steps.nextSnapshotVersion.outputs.NEXT_SNAPSHOT_VERSION}} - RELEASE_VERSION: ${{needs.get_major_minor_patch_inputs.outputs.RELEASE_VERSION}} - - name: "Increment ${{github.event.inputs.action}} Version" - steps: - - name: Set Env - Major - shell: bash - run: | - VERSION_PICKED=${{env.ACTION_INPUT}} - if [[ "$VERSION_PICKED" == "Major" ]]; then - echo "VERSION_NUMBER=${{needs.get_major_minor_patch_inputs.outputs._MAJOR}}" >> $GITHUB_ENV - elif [[ "$VERSION_PICKED" == "Minor" ]]; then - echo "VERSION_NUMBER=${{needs.get_major_minor_patch_inputs.outputs._MINOR}}" >> $GITHUB_ENV - else - echo "VERSION_NUMBER=${{needs.get_major_minor_patch_inputs.outputs._PATCH}}" >> $GITHUB_ENV - fi - - - name: Print Version - run: echo ${{env.ACTION_INPUT}} -- ${{env.VERSION_NUMBER}} - - - name: Increment Version - run: echo "NEW_VERSION_NUMBER=$((${{env.VERSION_NUMBER}} + 1))" >> $GITHUB_ENV - - - name: Generate New Snapshot Version Output - id: nextSnapshotVersion - shell: bash - run: | - VERSION_PICKED=${{env.ACTION_INPUT}} - if [[ "$VERSION_PICKED" == "Major" ]]; then - echo "NEXT_SNAPSHOT_VERSION=${{env.NEW_VERSION_NUMBER}}.0.0" >> $GITHUB_OUTPUT - elif [[ "$VERSION_PICKED" == "Minor" ]]; then - echo "NEXT_SNAPSHOT_VERSION=${{needs.get_major_minor_patch_inputs.outputs._MAJOR}}.${{env.NEW_VERSION_NUMBER}}.0" >> $GITHUB_OUTPUT - else - echo "NEXT_SNAPSHOT_VERSION=${{needs.get_major_minor_patch_inputs.outputs._MAJOR}}.${{needs.get_major_minor_patch_inputs.outputs._MINOR}}.${{env.NEW_VERSION_NUMBER}}" >> $GITHUB_OUTPUT - fi - - - name: Print Versions - run: | - echo "Next Development Version: ${{steps.nextSnapshotVersion.outputs.NEXT_SNAPSHOT_VERSION}}-SNAPSHOT" - echo "Release Version: ${{needs.get_major_minor_patch_inputs.outputs.RELEASE_VERSION}}" - - call_release_workflow_incremented_version: - needs: - - increment_version - uses: ikmdev/Demo_Java_Maven/.github/workflows/reusable_release_workflow.yaml@main - name: Call Release Workflow With Incremented Version - permissions: write-all - secrets: inherit - with: - snapshot_version: ${{needs.increment_version.outputs.NEXT_SNAPSHOT_VERSION}}-SNAPSHOT - release_version: ${{needs.increment_version.outputs.RELEASE_VERSION}} \ No newline at end of file From 7eac82def901713bf312e54496133aa104305dd3 Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:42:33 -0500 Subject: [PATCH 4/7] Update build.yml --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4fcf5a4..e75a396 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,16 +28,16 @@ jobs: # with: # servers: '[{"id": "nexus-repo", "username": "${{ secrets.NEXUS_USER_DEMO }}", "password": "${{secrets.NEXUS_PASSWORD_DEMO}}" }]' - # - name: Build IKMDEV Code - # uses: ikmdev/maven-clean-install-build-action@main - # with: - # branch_name: ${{env.BRANCH_NAME}} - # sonarcloud_token: ${{ secrets.SONAR_TOKEN }} - # sonarcloud_host_url: ${{ 'https://sonarcloud.io/' }} - # sonarcloud_organization: ${{ github.repository_owner }} - # sonarcloud_sources: ${{ 'src/main/java' }} - # sonarcloud_projectKey: ${{ github.repository_owner }}_${{ github.event.repository.name }} - # sonarcloud_coverage_jacoco_xmlReportPaths: ${{ 'target/site/jacoco/jacoco.xml' }} - # sonarcloud_java_binaries: ${{ 'target/classes' }} - # sonarcloud_tests: ${{ 'src/test/java' }} + - name: Build IKMDEV Code + uses: ikmdev/maven-clean-install-build-action@main + with: + branch_name: ${{env.BRANCH_NAME}} + sonarcloud_token: ${{ secrets.SONAR_TOKEN }} + sonarcloud_host_url: ${{ 'https://sonarcloud.io/' }} + sonarcloud_organization: ${{ github.repository_owner }} + sonarcloud_sources: ${{ 'src/main/java' }} + sonarcloud_projectKey: ${{ github.repository_owner }}_${{ github.event.repository.name }} + sonarcloud_coverage_jacoco_xmlReportPaths: ${{ 'target/site/jacoco/jacoco.xml' }} + sonarcloud_java_binaries: ${{ 'target/classes' }} + sonarcloud_tests: ${{ 'src/test/java' }} From a098c08c280f476ac701beda1284fd7c9ba284be Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:47:25 -0500 Subject: [PATCH 5/7] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e75a396..3239d4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: # servers: '[{"id": "nexus-repo", "username": "${{ secrets.NEXUS_USER_DEMO }}", "password": "${{secrets.NEXUS_PASSWORD_DEMO}}" }]' - name: Build IKMDEV Code - uses: ikmdev/maven-clean-install-build-action@main + uses: casaras1/maven-clean-install-build-action@main with: branch_name: ${{env.BRANCH_NAME}} sonarcloud_token: ${{ secrets.SONAR_TOKEN }} From 68e6ce0003d747b7f02629fe369332357cb0facd Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:13:58 -0500 Subject: [PATCH 6/7] Update build.yml --- .github/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3239d4d..803eca1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Workflow run-name: 'Build Workflow -- ${{ github.head_ref || github.ref_name }}' -# Pipeline/Workflow Triggers +# Pipeline/Workflow Triggers for the test demo on: push: pull_request: @@ -28,16 +28,16 @@ jobs: # with: # servers: '[{"id": "nexus-repo", "username": "${{ secrets.NEXUS_USER_DEMO }}", "password": "${{secrets.NEXUS_PASSWORD_DEMO}}" }]' - - name: Build IKMDEV Code - uses: casaras1/maven-clean-install-build-action@main - with: - branch_name: ${{env.BRANCH_NAME}} - sonarcloud_token: ${{ secrets.SONAR_TOKEN }} - sonarcloud_host_url: ${{ 'https://sonarcloud.io/' }} - sonarcloud_organization: ${{ github.repository_owner }} - sonarcloud_sources: ${{ 'src/main/java' }} - sonarcloud_projectKey: ${{ github.repository_owner }}_${{ github.event.repository.name }} - sonarcloud_coverage_jacoco_xmlReportPaths: ${{ 'target/site/jacoco/jacoco.xml' }} - sonarcloud_java_binaries: ${{ 'target/classes' }} - sonarcloud_tests: ${{ 'src/test/java' }} + # - name: Build IKMDEV Code + # uses: ikmdev/maven-clean-install-build-action@main + # with: + # branch_name: ${{env.BRANCH_NAME}} + # sonarcloud_token: ${{ secrets.SONAR_TOKEN }} + # sonarcloud_host_url: ${{ 'https://sonarcloud.io/' }} + # sonarcloud_organization: ${{ github.repository_owner }} + # sonarcloud_sources: ${{ 'src/main/java' }} + # sonarcloud_projectKey: ${{ github.repository_owner }}_${{ github.event.repository.name }} + # sonarcloud_coverage_jacoco_xmlReportPaths: ${{ 'target/site/jacoco/jacoco.xml' }} + # sonarcloud_java_binaries: ${{ 'target/classes' }} + # sonarcloud_tests: ${{ 'src/test/java' }} From ecd4a0dd61b9858a59ef6bc0ae6de2c01cc0044a Mon Sep 17 00:00:00 2001 From: casaras1 <164526009+casaras1@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:26:53 -0500 Subject: [PATCH 7/7] Update code_coverage.yaml --- .github/workflows/code_coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index a231a52..7cc1c40 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -26,7 +26,7 @@ jobs: servers: '[{"id": "nexus-repo", "username": "${{ secrets.NEXUS_USER_DEMO }}", "password": "${{secrets.NEXUS_PASSWORD_DEMO}}" }]' - name: IKMDEV Code Coverage - uses: casaras1/maven-code-coverage-action@main + uses: ikmdev/maven-code-coverage-action@main with: repo_name: ${{github.event.workflow_run.head_repository.full_name}} branch_name: ${{github.event.workflow_run.head_branch}}