Skip to content

Commit 6336bf2

Browse files
committed
Align build tooling with release/v2.15.0
- Add PR Maven Tests GitHub workflow (Java 17, mvn test) - Rename build-macos.bash to build-docker.bash; docker build --load - Extend .gitignore for workflows, .mvn-debug.log, .m2-local - Document local Maven/Docker build and test in README - Single-test example uses ConfigurationAsCodeTest (v2.14 test set) Made-with: Cursor
1 parent de11043 commit 6336bf2

4 files changed

Lines changed: 64 additions & 5 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Maven Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
test:
12+
name: Run Maven tests
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: '17'
24+
cache: maven
25+
26+
- name: Run test suite
27+
run: mvn -Daether.remoteRepositoryFilter.prefixes=false test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
*.DS_Store
33
*.iml
44
work*
5+
!.github/workflows/
6+
!.github/workflows/*.yml
57
lib*
68
target*
79
.m2
810
docker/jenkins/
9-
docker/squid/
11+
docker/squid/
12+
.mvn-debug.log
13+
.m2-local

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Anka Build Plugin
1+
# Anka Jenkins Build Plugin
2+
3+
[![PR Maven Tests](https://github.com/jenkinsci/anka-build-plugin/actions/workflows/pr-maven-tests.yml/badge.svg)](https://github.com/jenkinsci/anka-build-plugin/actions/workflows/pr-maven-tests.yml)
24

35
Usage of this plugin is detailed on our [Official Documentation](https://docs.veertu.com/anka/plugins-and-integrations/controller-+-registry/jenkins/).
46

@@ -12,10 +14,36 @@ Contributors are welcome! Please submit an Issue or PR.
1214

1315
### Build
1416

15-
See `build-macos.bash` for building the plugin.
17+
Build locally with Maven:
18+
19+
```bash
20+
mvn -Daether.remoteRepositoryFilter.prefixes=false clean package
21+
```
22+
23+
If you use Maven 3, you can usually omit `-Daether.remoteRepositoryFilter.prefixes=false`.
24+
25+
Or, alternatively, build in Docker:
26+
27+
```bash
28+
./build-docker.bash
29+
```
30+
31+
### Test
32+
33+
Run all tests:
34+
35+
```bash
36+
mvn -Daether.remoteRepositoryFilter.prefixes=false test
37+
```
38+
39+
Run a single test class:
40+
41+
```bash
42+
mvn -Daether.remoteRepositoryFilter.prefixes=false -Dtest=ConfigurationAsCodeTest test
43+
```
1644

1745
## Release
1846

1947
```bash
2048
mvn release:prepare release:perform
21-
```
49+
```

build-macos.bash renamed to build-docker.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -exo pipefail
33
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
44
cd $SCRIPT_DIR/_ci
5-
docker build --no-cache -t anka-build-plugin .
5+
docker build --no-cache -t anka-build-plugin --load .
66
cd $SCRIPT_DIR
77
docker run \
88
--rm --name anka-build-plugin -it \

0 commit comments

Comments
 (0)