-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (44 loc) · 1.73 KB
/
Copy pathjustfile
File metadata and controls
49 lines (44 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# EC2 Plugin for Jenkins (Percona fork) - local build/test
# Patched: ComputerRetentionWork NPE/timer-death guards + EKS IRSA support
# (WebIdentityTokenFileCredentialsProvider, AWS SDK v2).
# Releases are tag-driven: push a v*.percona.* tag and .github/workflows/release.yml
# builds the .hpi and publishes it to a GitHub Release.
version := "5.24.percona.4"
image := "maven:3.9-eclipse-temurin-17"
container := "ec2-build"
m2_volume := "ec2-m2-cache"
# Build plugin .hpi (skipping tests for speed)
build:
#!/usr/bin/env bash
set -euo pipefail
docker volume create {{m2_volume}} >/dev/null 2>&1 || true
docker rm -f {{container}} 2>/dev/null || true
docker create --name {{container}} -w /plugin \
-v {{m2_volume}}:/root/.m2/repository \
{{image}} \
mvn clean package -DskipTests -Dchangelist={{version}}
docker cp "$(pwd)/." {{container}}:/plugin
docker start -a {{container}}
docker cp {{container}}:/plugin/target/ec2.hpi ./ec2-{{version}}.hpi
docker rm {{container}}
ls -lh ./ec2-{{version}}.hpi
# Build and run tests
test:
#!/usr/bin/env bash
set -euo pipefail
docker volume create {{m2_volume}} >/dev/null 2>&1 || true
docker rm -f {{container}} 2>/dev/null || true
docker create --name {{container}} -w /plugin \
-v {{m2_volume}}:/root/.m2/repository \
{{image}} \
mvn clean verify -Dchangelist={{version}}
docker cp "$(pwd)/." {{container}}:/plugin
docker start -a {{container}}
docker rm {{container}}
# Clean build artifacts and cache
clean:
rm -f ec2-*.hpi
docker rm -f {{container}} 2>/dev/null || true
# Nuke Maven cache volume (forces full re-download)
clean-cache:
docker volume rm {{m2_volume}} 2>/dev/null || true