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 new file mode 100644 index 0000000..2a72abb --- /dev/null +++ b/.github/workflows/hpi-builder.yml @@ -0,0 +1,39 @@ +name: Jenkins plugin .hpi build + +# This workflow will build an executable Jenkins plugin in .hpi format for further manual installation in Jenkins + +on: [push, workflow_dispatch] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Jenkins plugin code + uses: actions/checkout@v4 + + - name: Check repository content + shell: bash + run: pwd && ls -la + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + + - name: Build Jenkins Plugin into .hpi + shell: bash + run: mvn clean package # Build the plugin using Maven + + - name: Verify content of target folder + shell: bash + run: pwd && ls -l target/ + + - name: Archive the Build Output + uses: actions/upload-artifact@v4 + with: + name: Zowe zDevOps plugin + path: target/*.hpi \ No newline at end of file