From 4c3d4a4a371c82bf3b86166afb6101f96b460c3e Mon Sep 17 00:00:00 2001 From: Hsing-Hui Hsu Date: Thu, 21 May 2020 11:12:12 -0700 Subject: [PATCH 1/2] temporarily remove codebuild condition from mergify --- .mergify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 651eddd76..7bc5b538d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,7 +4,6 @@ pull_request_rules: - base~=master - "#approved-reviews-by>=2" - approved-reviews-by=@aws/aws-ecs-devx - - status-success=AWS CodeBuild us-west-2 (ecs-cli-ci) - status-success=continuous-integration/travis-ci/pr - -approved-reviews-by~=author - -title~=(WIP|wip) From 173379bea6d841fff4ae5ede45e47640e32ae541 Mon Sep 17 00:00:00 2001 From: Austin Ely Date: Fri, 22 May 2020 12:43:11 -0700 Subject: [PATCH 2/2] buildpsec for 4.0 --- buildspec.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index c643f4d3b..b82669d5c 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -13,22 +13,21 @@ phases: - ls -lah - mkdir -p /go/src/github.com/aws/amazon-ecs-cli - cp -R . /go/src/github.com/aws/amazon-ecs-cli/ - - | - env -i PATH=$PATH GOPATH=`go env GOPATH` GOROOT=`go env GOROOT` GOCACHE=`go env GOCACHE` \ - go test -race -v -cover github.com/aws/amazon-ecs-cli/ecs-cli/modules/... + - cd /go/src/github.com/aws/amazon-ecs-cli + - go test -race -v -cover ./ecs-cli/modules/... # make a copy of the version.go because `go run gen/version-gen.go` will # modify it. - - cp /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/version.go /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/_version.go + - cp ./ecs-cli/modules/version/version.go ./ecs-cli/modules/version/_version.go # need to cd into the version package because version-gen.go assumes the relative # location of the VERSION file. - - cd /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/ + - cd ./ecs-cli/modules/version/ # since we are running the go program inside a Linux container, has to hardcode # the GOOS and GOARCH correspondinly regardless of what the host OS is. - GOOS=linux GOARCH=amd64 ECS_RELEASE=cleanbuild go run gen/version-gen.go build: commands: - echo "cd into $CODEBUILD_SRC_DIR" - - cd $CODEBUILD_SRC_DIR + - cd /go/src/github.com/aws/amazon-ecs-cli - echo "Compilation context:" - echo "CODEBUILD_SOURCE_VERSION=$CODEBUILD_SOURCE_VERSION" - VERSION=`git tag --points-at HEAD` @@ -46,9 +45,9 @@ phases: echo "the VERSION file contains a version number that is different from the git tag. file: $CHECKED_IN_VERSION, tag: $VERSION" exit 1 fi - - GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-windows-amd64-$VERSION.exe github.com/aws/amazon-ecs-cli/ecs-cli/ - - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-linux-amd64-$VERSION github.com/aws/amazon-ecs-cli/ecs-cli/ - - GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-darwin-amd64-$VERSION github.com/aws/amazon-ecs-cli/ecs-cli/ + - GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-windows-amd64-$VERSION.exe ./ecs-cli/ + - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-linux-amd64-$VERSION ./ecs-cli/ + - GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o aws/amazon-ecs-cli/ecs-cli-darwin-amd64-$VERSION ./ecs-cli/ finally: - echo "built artifacts:" - ls -lah aws/amazon-ecs-cli/ @@ -70,4 +69,4 @@ phases: - echo "aws/amazon-ecs-cli/ecs-cli-darwin-amd64-latest" >> $MANIFESTFILE artifacts: files: - - '**/*' \ No newline at end of file + - '**/*'