From 9274656a4ad83f676705e77165afdf5ee7c095d5 Mon Sep 17 00:00:00 2001 From: IBA-mainframe-dev Date: Fri, 26 Apr 2024 00:08:09 +0200 Subject: [PATCH] Optimized workflow execution time and removed the old one --- .github/workflows/builder.yml | 54 ------------------------------- .github/workflows/hpi-builder.yml | 17 ++-------- 2 files changed, 3 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/builder.yml diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml deleted file mode 100644 index 5c75802..0000000 --- a/.github/workflows/builder.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Maven build - -on: - workflow_dispatch: - push: - branches: - - 'release/*' - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout of github repository - uses: actions/checkout@v3 - - - name: Setup of environment - uses: ./.github/setup - - - name: Check repository content - shell: bash - run: pwd && ls -la - - - name: Maven wrapper - shell: bash - run: mvn wrapper:wrapper - - - name: Test run - shell: bash - run: ./mvnw clean verify - - - name: Sonarcloud scans - uses: ./.github/sonar - env: - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} - - - name: Plugin build - shell: bash - run: ./mvnw clean compile hpi:hpi - - - name: Verify content of target folder - shell: bash - run: pwd && ls -l target/ - - - name: Publish built plugin - uses: actions/upload-artifact@v3 - with: - name: builtPlugin - path: ./target/zdevops.hpi diff --git a/.github/workflows/hpi-builder.yml b/.github/workflows/hpi-builder.yml index bf555fd..2a72abb 100644 --- a/.github/workflows/hpi-builder.yml +++ b/.github/workflows/hpi-builder.yml @@ -1,6 +1,6 @@ name: Jenkins plugin .hpi build -# Workflow triggers: whenever code is pushed to the main branch or a pull request is opened against it +# This workflow will build an executable Jenkins plugin in .hpi format for further manual installation in Jenkins on: [push, workflow_dispatch] @@ -14,21 +14,10 @@ jobs: - name: Checkout Jenkins plugin code uses: actions/checkout@v4 - - name: Setup of environment - uses: ./.github/setup - - name: Check repository content shell: bash run: pwd && ls -la - - name: Maven wrapper - shell: bash - run: mvn wrapper:wrapper - - - name: Test run - shell: bash - run: ./mvnw clean verify - - name: Set up Java uses: actions/setup-java@v4 with: @@ -37,7 +26,7 @@ jobs: - name: Build Jenkins Plugin into .hpi shell: bash - run: ./mvnw clean compile hpi:hpi # Build the plugin using Maven + run: mvn clean package # Build the plugin using Maven - name: Verify content of target folder shell: bash @@ -47,4 +36,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: Zowe zDevOps plugin - path: ./target/zdevops.hpi \ No newline at end of file + path: target/*.hpi \ No newline at end of file