Skip to content

Commit 27277fd

Browse files
authored
Bump minimum required docker version in ecs-init spec file (aws#4732)
* Bump minimum required docker version in ecs-init spec file * Codebuild job tweaks/fixes
1 parent efa1f45 commit 27277fd

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

build-infrastructure/codebuild-devbuild-stack.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Resources:
3434
ConcurrentBuildLimit: 10
3535
Description: A CodeBuild project to build artifacts (AMD/x86_64). Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3
3636
Environment:
37-
ComputeType: BUILD_GENERAL1_SMALL
37+
ComputeType: BUILD_GENERAL1_MEDIUM
3838
Image: 'public.ecr.aws/lts/ubuntu:20.04'
3939
ImagePullCredentialsType: CODEBUILD
4040
PrivilegedMode: false
@@ -63,7 +63,7 @@ Resources:
6363
ConcurrentBuildLimit: 10
6464
Description: A CodeBuild project to build artifacts (ARM). Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3
6565
Environment:
66-
ComputeType: BUILD_GENERAL1_SMALL
66+
ComputeType: BUILD_GENERAL1_MEDIUM
6767
Image: 'public.ecr.aws/lts/ubuntu:20.04'
6868
ImagePullCredentialsType: CODEBUILD
6969
PrivilegedMode: false
@@ -92,7 +92,7 @@ Resources:
9292
ConcurrentBuildLimit: 10
9393
Description: A CodeBuild project to build artifacts (ARM). Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3
9494
Environment:
95-
ComputeType: BUILD_GENERAL1_SMALL
95+
ComputeType: BUILD_GENERAL1_MEDIUM
9696
Image: 'aws/codebuild/amazonlinux2-aarch64-standard:3.0'
9797
ImagePullCredentialsType: CODEBUILD
9898
PrivilegedMode: true
@@ -121,7 +121,7 @@ Resources:
121121
ConcurrentBuildLimit: 10
122122
Description: A CodeBuild project to build artifacts (AMD/x86_64). Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3
123123
Environment:
124-
ComputeType: BUILD_GENERAL1_SMALL
124+
ComputeType: BUILD_GENERAL1_MEDIUM
125125
Image: 'aws/codebuild/amazonlinux2-x86_64-standard:5.0'
126126
ImagePullCredentialsType: CODEBUILD
127127
PrivilegedMode: true
@@ -136,7 +136,7 @@ Resources:
136136
TimeoutInMinutes: 60
137137
Visibility: PRIVATE
138138

139-
# Creates a CodeBuild project for Amazon Linux 2 ARM
139+
# Creates a CodeBuild project for Amazon Linux 2 ARM
140140
Amzn2ArmProject:
141141
Type: 'AWS::CodeBuild::Project'
142142
Properties:
@@ -152,7 +152,7 @@ Resources:
152152
ConcurrentBuildLimit: 10
153153
Description: A CodeBuild project to build artifacts (ARM) on Amazon Linux 2. Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3.
154154
Environment:
155-
ComputeType: BUILD_GENERAL1_SMALL
155+
ComputeType: BUILD_GENERAL1_MEDIUM
156156
Image: 'aws/codebuild/amazonlinux2-aarch64-standard:2.0'
157157
ImagePullCredentialsType: CODEBUILD
158158
PrivilegedMode: true
@@ -183,7 +183,7 @@ Resources:
183183
ConcurrentBuildLimit: 10
184184
Description: A CodeBuild project to build artifacts (AMD/x86_64) on Amazon Linux 2. Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3.
185185
Environment:
186-
ComputeType: BUILD_GENERAL1_SMALL
186+
ComputeType: BUILD_GENERAL1_MEDIUM
187187
Image: 'aws/codebuild/amazonlinux2-x86_64-standard:4.0'
188188
ImagePullCredentialsType: CODEBUILD
189189
PrivilegedMode: true
@@ -214,7 +214,7 @@ Resources:
214214
ConcurrentBuildLimit: 10
215215
Description: A CodeBuild project to build artifacts (ARM) on Amazon-Linux 2023. Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3.
216216
Environment:
217-
ComputeType: BUILD_GENERAL1_SMALL
217+
ComputeType: BUILD_GENERAL1_MEDIUM
218218
Image: 'aws/codebuild/amazonlinux2-aarch64-standard:3.0'
219219
ImagePullCredentialsType: CODEBUILD
220220
PrivilegedMode: true
@@ -245,7 +245,7 @@ Resources:
245245
ConcurrentBuildLimit: 10
246246
Description: A CodeBuild project to build artifacts (AMD/x86_64) on Amazon-Linux 2023. Builds are triggered by PR creation, updates, and merges, and artifacts are saved in S3.
247247
Environment:
248-
ComputeType: BUILD_GENERAL1_SMALL
248+
ComputeType: BUILD_GENERAL1_MEDIUM
249249
Image: 'aws/codebuild/amazonlinux2-x86_64-standard:5.0'
250250
ImagePullCredentialsType: CODEBUILD
251251
PrivilegedMode: true
@@ -258,8 +258,8 @@ Resources:
258258
Location: !Ref GithubFullRepoName
259259
Type: GITHUB
260260
TimeoutInMinutes: 60
261-
Visibility: PRIVATE
262-
261+
Visibility: PRIVATE
262+
263263
# Defines the service roles for the CodeBuild projects
264264
ServiceRoleAmd:
265265
Type: 'AWS::IAM::Role'
@@ -303,7 +303,7 @@ Resources:
303303
- 's3:GetBucketAcl'
304304
- 's3:GetBucketLocation'
305305
PolicyName: !Sub '${AWS::StackName}-ServicePolicyAmd'
306-
RoleName: !Sub '${AWS::StackName}-ServiceRoleAmd'
306+
RoleName: !Sub '${AWS::StackName}-ServiceRoleAmd'
307307
ServiceRoleUbuntuAmd:
308308
Type: 'AWS::IAM::Role'
309309
Properties:
@@ -432,7 +432,7 @@ Resources:
432432
- 's3:GetBucketAcl'
433433
- 's3:GetBucketLocation'
434434
PolicyName: !Sub '${AWS::StackName}-ServicePolicyUbuntuArm'
435-
RoleName: !Sub '${AWS::StackName}-ServiceRoleUbuntuArm'
435+
RoleName: !Sub '${AWS::StackName}-ServiceRoleUbuntuArm'
436436
ServiceRoleAmzn2Arm:
437437
Type: 'AWS::IAM::Role'
438438
Properties:

buildspecs/pr-build-amzn.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,20 @@ phases:
4949
# Need to install GOLANG explicitly as required versions do not come preinstalled
5050
# Remove existing go installation (goenv utility)
5151
- sudo rm -rf /root/.goenv
52-
- sudo rm -rf /usr/local/go/bin/go
52+
- sudo rm -rf /usr/local/go/bin/go
5353

54-
# Define the Go version to install
55-
- GOVERSION="$(cat GO_VERSION)"
56-
5754
# Install Go and define variables based on Amazon Linux version (2 or 2023)
5855
# Amazon Linux 2023 uses package manager DNF, while older versions use YUM
5956
# Set the appropriate AL23 version echo string to include in build log
6057
- |
6158
if [[ "$amzn_version" = "amzn2023" ]]; then
6259
sudo dnf --releasever="$AL23_VERSION" update -y
63-
sudo dnf install -y golang-$GOVERSION
60+
sudo dnf install -y golang
6461
echo "Amazon Linux 2023 Version: $AL23_VERSION" 2>&1 | tee -a $BUILD_LOG
65-
62+
6663
elif [[ "$amzn_version" = "amzn2" ]]; then
67-
sudo yum install -y golang-$GOVERSION
68-
64+
sudo yum install -y golang
65+
6966
else
7067
echo "Unsupported Amazon Linux version"
7168
exit 1
@@ -74,10 +71,10 @@ phases:
7471
# Define the log file with AL version (amzn2 or amzn23) and the architecture
7572
- BUILD_LOG="build_${amzn_version}_${architecture}.log"
7673

77-
# Print all environment variables to the log file
74+
# Print all environment variables to the log file
7875
- which go | tee -a $BUILD_LOG
7976
- go version | tee -a $BUILD_LOG
80-
77+
8178
build:
8279
commands:
8380
# Print the current working directory to the log file
@@ -108,7 +105,7 @@ phases:
108105
AMZN_LINUX_RPM="ecs-init-${AGENT_VERSION}-1.${amzn_version}.aarch64.rpm"
109106
fi
110107
111-
# List directory files to view artifacts in build log
108+
# List directory files to view artifacts in build log
112109
- ls
113110

114111
post_build:
@@ -118,4 +115,4 @@ artifacts:
118115
files:
119116
- $AMZN_LINUX_RPM
120117
- $BUILD_LOG
121-
name: $CODEBUILD_RESOLVED_SOURCE_VERSION
118+
name: $CODEBUILD_RESOLVED_SOURCE_VERSION

packaging/amazon-linux-ami-integrated/ecs-agent.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Requires: systemd
5050
Requires: upstart
5151
%endif
5252
Requires: iptables
53-
Requires: docker >= 17.06.2ce
53+
Requires: docker >= 20.10.0
5454
Requires: procps
5555

5656
# The following 'Provides' lists the vendored dependencies bundled in

0 commit comments

Comments
 (0)