-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathbuildspec.yml
More file actions
48 lines (43 loc) · 1.32 KB
/
buildspec.yml
File metadata and controls
48 lines (43 loc) · 1.32 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
version: 0.2
env:
variables:
MAVEN_OPTS: "-Xms1g -Xmx2g"
SKIP_METHODTIMER_TEST: true
SKIP_GUI_TEST: true
phases:
install:
runtime-versions:
java: corretto25
build:
commands:
- java -version
# Run the complete build with both unit and integration tests
- mvn clean install surefire-report:report -P release
- export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- |
if [[ "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
aws ssm put-parameter --name /tank/latest-version --value "$PROJECT_VERSION" --type String --overwrite
echo "Published version $PROJECT_VERSION to SSM /tank/latest-version"
else
echo "Skipping SSM update for SNAPSHOT version $PROJECT_VERSION"
fi
reports:
UnitTestReports:
files:
- '**/target/surefire-reports/TEST-*.xml'
- '**/target/surefire-reports/*.txt'
base-directory: '.'
IntegrationTestReports:
files:
- '**/target/failsafe-reports/TEST-*.xml'
- '**/target/failsafe-reports/*.txt'
base-directory: '.'
artifacts:
name: TANK/$PROJECT_VERSION/TankZip.zip
files:
- web/web_ui/target/tank.war
- agent/agent_startup_pkg/target/agent-startup-pkg.zip
discard-paths: yes
cache:
paths:
- '/root/.m2/**/*'