Skip to content

Commit

Permalink
Enable Codecov Coverage and Jenkins Security Scan
Browse files Browse the repository at this point in the history
* add workflows
* add icons to the readme
  • Loading branch information
strangelookingnerd committed May 11, 2024
1 parent 924feaa commit 5713af7
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment: false
29 changes: 29 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Generate Coverage Report'

on:
push:
branches:
- master
pull_request:

jobs:
coverage:
runs-on: ubuntu-latest
name: Coverage on Ubuntu
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
check-latest: true
cache: 'maven'
- name: Generate coverage with JaCoCo
run: mvn clean verify jacoco:prepare-agent test integration-test jacoco:report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./target/site/jacoco/jacoco.xml
21 changes: 21 additions & 0 deletions .github/workflows/jenkins-security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Jenkins Security Scan

on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
workflow_dispatch:

permissions:
security-events: write
contents: read
actions: read

jobs:
security-scan:
uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2
with:
java-cache: '' # Optionally enable use of a build dependency cache. Specify 'maven' or 'gradle' as appropriate.
java-version: 17 # What version of Java to set up for the build.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Badge plugin

[![Build Status](https://ci.jenkins.io/job/Plugins/job/badge-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/badge-plugin/job/master/)
[![Codecov Coverage](https://codecov.io/gh/jenkinsci/badge-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/jenkinsci/badge-plugin)
[![Jenkins Security Scan](https://github.com/jenkinsci/badge-plugin/actions/workflows/jenkins-security-scan.yml/badge.svg)](https://github.com/jenkinsci/badge-plugin/actions/workflows/jenkins-security-scan.yml)

[![Installations](https://img.shields.io/jenkins/plugin/i/badge.svg?color=blue&label=installations)](https://stats.jenkins.io/pluginversions/badge.html)
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/badge-plugin.svg?color=blue)](https://github.com/jenkinsci/badge-plugin/graphs/contributors)
[![Changelog](https://img.shields.io/github/release/jenkinsci/badge-plugin.svg?label=changelog)](https://github.com/jenkinsci/badge-plugin/releases/latest)

Jenkins plugin to add badges and build summary entries from a pipeline.

This plugin was forked from the [Groovy Postbuild Plugin](https://plugins.jenkins.io/groovy-postbuild) which will in future use the API from this plugin.
Expand Down
8 changes: 8 additions & 0 deletions src/test/resources/readme/README.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Badge plugin

[![Build Status](https://ci.jenkins.io/job/Plugins/job/badge-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/badge-plugin/job/master/)
[![Codecov Coverage](https://codecov.io/gh/jenkinsci/badge-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/jenkinsci/badge-plugin)
[![Jenkins Security Scan](https://github.com/jenkinsci/badge-plugin/actions/workflows/jenkins-security-scan.yml/badge.svg)](https://github.com/jenkinsci/badge-plugin/actions/workflows/jenkins-security-scan.yml)

[![Installations](https://img.shields.io/jenkins/plugin/i/badge.svg?color=blue&label=installations)](https://stats.jenkins.io/pluginversions/badge.html)
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/badge-plugin.svg?color=blue)](https://github.com/jenkinsci/badge-plugin/graphs/contributors)
[![Latest Version](https://img.shields.io/github/release/jenkinsci/badge-plugin.svg?label=changelog)](https://github.com/jenkinsci/badge-plugin/releases/latest)

Jenkins plugin to add badges and build summary entries from a pipeline.

This plugin was forked from the [Groovy Postbuild Plugin](https://plugins.jenkins.io/groovy-postbuild) which will in future use the API from this plugin.
Expand Down

0 comments on commit 5713af7

Please sign in to comment.