Skip to content

Commit f82ec7f

Browse files
committed
Add function to install golang per AL version
Add an echo to find where GO_VERSION is being retreived Remove else statement to check the if statement installs correct go version Add logic to retreive AL2023 version Remove quotes for variable definitions Move go and AL23 variables to install phase Remove qtrailing quotation mark for go variable remove unused agent prometheus 'generic metrics' (aws#4225) go mod tidy && go mod vendor
1 parent 1eb5925 commit f82ec7f

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,6 @@ docker-release: pause-container-release cni-plugins .out-stamp
108108
--rm \
109109
"amazon/amazon-ecs-agent-${BUILD}:make"
110110

111-
# Make a Windows release target
112-
windows-docker-release: .out-stamp
113-
@docker build --build-arg GO_VERSION=${GO_VERSION} -f scripts/dockerfiles/Dockerfile.cleanbuild -t "amazon/amazon-ecs-agent-cleanbuild-windows:make" .
114-
@docker run --net=none \
115-
--env TARGET_OS="windows" \
116-
--env GO111MODULE=auto \
117-
--user "$(USERID)" \
118-
--volume "$(PWD)/out:/out" \
119-
--volume "$(PWD):/src/amazon-ecs-agent" \
120-
--rm \
121-
"amazon/amazon-ecs-agent-cleanbuild-windows:make"
122-
123-
124111
# Legacy target : Release packages our agent into a "scratch" based dockerfile
125112
release: certs docker-release
126113
@./scripts/create-amazon-ecs-scratch
@@ -241,7 +228,7 @@ build-ecs-cni-plugins:
241228
-u "$(USERID)" \
242229
-v "$(PWD)/out/amazon-ecs-cni-plugins:/go/src/github.com/aws/amazon-ecs-cni-plugins/bin/plugins" \
243230
-v "$(ECS_CNI_REPOSITORY_SRC_DIR):/go/src/github.com/aws/amazon-ecs-cni-plugins" \
244-
"amazon/amazon-ecs-build-ecs-cni-plugins:make"
231+
"amazon/amazon-ecs-build-ecs-cni-plugins:make"
245232
@echo "Built amazon-ecs-cni-plugins successfully."
246233

247234
build-vpc-cni-plugins:
@@ -399,15 +386,15 @@ get-deps-init:
399386
GO111MODULE=on go install github.com/fzipp/gocyclo/cmd/[email protected]
400387
GO111MODULE=on go install honnef.co/go/tools/cmd/[email protected]
401388

402-
amazon-linux-sources.tgz: get-cni-sources
389+
amazon-linux-sources.tgz:
403390
./scripts/update-version.sh
404391
cp packaging/amazon-linux-ami-integrated/ecs-agent.spec ecs-agent.spec
405392
cp packaging/amazon-linux-ami-integrated/ecs.conf ecs.conf
406393
cp packaging/amazon-linux-ami-integrated/ecs.service ecs.service
407394
cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf amazon-ecs-volume-plugin.conf
408395
cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service amazon-ecs-volume-plugin.service
409396
cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket amazon-ecs-volume-plugin.socket
410-
tar -czf ./sources.tgz ecs-init scripts misc agent amazon-ecs-cni-plugins amazon-vpc-cni-plugins agent-container Makefile VERSION GO_VERSION
397+
tar -czf ./sources.tgz ecs-init scripts misc agent amazon-ecs-cni-plugins amazon-vpc-cni-plugins agent-container Makefile VERSION RELEASE_COMMIT
411398

412399
.amazon-linux-rpm-integrated-done: amazon-linux-sources.tgz
413400
test -e SOURCES || ln -s . SOURCES

buildspecs/pr-build-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
env:
44
variables:
55
# Github username of the forked repo on which to make builds
6-
GITHUBUSERNAME: Ephylouise
6+
GITHUBUSERNAME: aws
77

88
phases:
99
install:

buildspecs/pr-build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ phases:
4949
- WINDOWS_EXE="amazon-ecs-agent.exe"
5050
- echo $(pwd) 2>&1 | tee -a $BUILD_LOG
5151

52-
5352
# Path readjustment for codebuild testing with fork and setting GOPATH appropriately
5453
- echo "GitHub Username = $GITHUBUSERNAME" 2>&1 | tee -a $BUILD_LOG
5554
- cd ../../../..
@@ -73,15 +72,19 @@ phases:
7372

7473
# Rename artifacts for architecture
7574
- |
76-
if [[ $architecture == "arm64" ]]; then
75+
if [[ $architecture == "arm64" ]] ; then
7776
mv $ECS_AGENT_TAR "ecs-agent-arm64-v${AGENT_VERSION}.tar"
7877
mv $CSI_DRIVER_TAR "./ecs-agent/daemonimages/csidriver/tarfiles/ebs-csi-driver-arm64.tar"
7978
ECS_AGENT_RPM="amazon-ecs-init-${AGENT_VERSION}-1.aarch64.rpm"
8079
ECS_AGENT_TAR="ecs-agent-arm64-v${AGENT_VERSION}.tar"
8180
CSI_DRIVER_TAR="./ecs-agent/daemonimages/csidriver/tarfiles/ebs-csi-driver-arm64.tar"
8281
fi
8382
83+
<<<<<<< HEAD
8484
# List directory files to view artifacts in build log
85+
=======
86+
# List directory file to view artifacts in build log
87+
>>>>>>> 9604f8e3b (Remove duplicate go version command)
8588
- ls
8689

8790
post_build:

0 commit comments

Comments
 (0)