ci.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Gogs + Jenkins CI contract (GitHub Actions-style).
  2. # Jenkins executes Jenkinsfile; this file documents the same pipeline.
  3. # Triggers: Gogs webhook (push, pull_request) → Jenkins Generic Webhook Trigger
  4. # (only refs/heads/main, or PRs whose base branch is main).
  5. name: ci
  6. on:
  7. push:
  8. branches: [main]
  9. pull_request:
  10. branches: [main]
  11. jobs:
  12. verify-and-package:
  13. runs-on: jenkins-dind
  14. container: ura-ci-maven:21
  15. steps:
  16. - name: Checkout
  17. uses: git
  18. with:
  19. repository: https://git.barcelos.dev/allan/jenkins-mfa-auth-plugin.git
  20. ref: ${{ github.sha }}
  21. - name: Test
  22. run: mvn -B -ntp verify
  23. - name: Package plugin
  24. run: mvn -B -ntp -DskipTests -Dset.changelist package
  25. - name: Archive HPI
  26. uses: archiveArtifacts
  27. with:
  28. path: target/*.hpi
  29. - name: Release
  30. if: github.event_name == 'push' && github.ref == 'refs/heads/main'
  31. run: echo "HPI published as Jenkins lastSuccessfulBuild artifact"