forked from aws-observability/application-signals-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
48 lines (43 loc) · 1.23 KB
/
Copy pathbuildspec.yml
File metadata and controls
48 lines (43 loc) · 1.23 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
phases:
install:
runtime-versions:
java: corretto17
golang: 1.22
commands:
- |
echo "Installing prerequisites..."
apt-get update
apt-get install -y jq
# Verify Docker is installed and running (pre-installed in CodeBuild image)
docker --version
systemctl status docker || service docker status || echo "Docker service check"
# Verify Go version
go version
# Verify Java version
java -version
echo "Prerequisites installed successfully"
pre_build:
commands:
- |
echo "Setting up environment variables..."
export ACCOUNT=$AWS_ACCOUNT_ID
export REGION=$AWS_DEFAULT_REGION
echo "Account: $ACCOUNT, Region: $REGION"
build:
commands:
- |
echo "Building Spring Boot services with Maven..."
chmod +x ./mvnw
./mvnw clean install -P buildDocker
echo "Building remaining services and pushing all images to ECR..."
chmod +x ./push-ecr.sh
./push-ecr.sh
post_build:
commands:
- |
echo "Build completed on `date`"
echo "All images have been pushed to ECR successfully"
cache:
paths:
- '/root/.m2/**/*'