| 12345678910111213141516171819202122232425262728293031323334 |
- # Gogs + Jenkins CI contract (GitHub Actions-style).
- # Jenkins executes Jenkinsfile; this file documents the same pipeline.
- # Triggers: Gogs webhook (push, pull_request) → Jenkins Generic Webhook Trigger
- # (only refs/heads/main, or PRs whose base branch is main).
- name: ci
- on:
- push:
- branches: [main]
- pull_request:
- branches: [main]
- jobs:
- verify-and-package:
- runs-on: jenkins-dind
- container: ura-ci-maven:21
- steps:
- - name: Checkout
- uses: git
- with:
- repository: https://git.barcelos.dev/allan/jenkins-mfa-auth-plugin.git
- ref: ${{ github.sha }}
- - name: Test
- run: mvn -B -ntp verify
- - name: Package plugin
- run: mvn -B -ntp -DskipTests -Dset.changelist package
- - name: Archive HPI
- uses: archiveArtifacts
- with:
- path: target/*.hpi
- - name: Release
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- run: publish HPI to Gogs Releases (tag 1.0.$BUILD_NUMBER)
|