Skip to content

Commit 302a4fc

Browse files
author
Andrew Nelson
committed
Add CICD Sensor backend, update docs, add CI workflows
1 parent 9742ca5 commit 302a4fc

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '11'
20+
distribution: 'temurin'
21+
cache: maven
22+
23+
- name: Build with Maven
24+
run: mvn clean package -DskipTests -Dspotbugs.skip=true
25+
26+
- name: Run tests
27+
run: mvn test -Dspotbugs.skip=true
28+
29+
- name: Upload HPI artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: qualys-scanner-hpi
33+
path: target/*.hpi
34+
retention-days: 30

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '11'
19+
distribution: 'temurin'
20+
cache: maven
21+
22+
- name: Build with Maven
23+
run: mvn clean package -DskipTests -Dspotbugs.skip=true
24+
25+
- name: Get version from tag
26+
id: version
27+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
28+
29+
- name: Create Release
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
files: target/*.hpi
33+
generate_release_notes: true
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)