11defaults : &defaults
2- working_directory : /go/src/github.com/gruntwork-io/git-xargs
32 docker :
43 - image : 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:go1.13
5-
6- environment :
7- GRUNTWORK_INSTALLER_VERSION : NONE
4+ environment :
85 TERRATEST_LOG_PARSER_VERSION : NONE
96 TERRAFORM_VERSION : NONE
107 TERRAGRUNT_VERSION : NONE
118 PACKER_VERSION : NONE
12- GOLANG_VERSION : 1.14
9+ GRUNTWORK_INSTALLER_VERSION : v0.0.35
10+ MODULE_CI_VERSION : v0.33.1
11+ GOLANG_VERSION : 1.16
12+ GO111MODULE : auto
13+ CGO_ENABLED : 1
1314install_gruntwork_utils : &install_gruntwork_utils
14- name : install gruntwork utils
15+ name : Install gruntwork utils
1516 command : |
17+ curl -Ls https://raw.githubusercontent.com/gruntwork-io/gruntwork-installer/master/bootstrap-gruntwork-installer.sh | bash /dev/stdin --version "${GRUNTWORK_INSTALLER_VERSION}"
18+ gruntwork-install --module-name "gruntwork-module-circleci-helpers" --repo "https://github.com/gruntwork-io/terraform-aws-ci" --tag "${MODULE_CI_VERSION}"
1619 configure-environment-for-gruntwork-module \
17- --terraform-version ${TERRAFORM_VERSION} \
18- --terragrunt-version ${TERRAGRUNT_VERSION} \
19- --packer-version ${PACKER_VERSION} \
20- --go-version ${GOLANG_VERSION}
20+ --terraform-version ${TERRAFORM_VERSION} \
21+ --terragrunt-version ${TERRAGRUNT_VERSION} \
22+ --packer-version ${PACKER_VERSION} \
23+ --go-version ${GOLANG_VERSION}
2124version : 2
2225jobs :
2326 test :
2427 << : *defaults
2528 steps :
2629 - checkout
27- - run :
28- << : *install_gruntwork_utils
29- - run :
30- name : run git-args tests
30+ - run :
3131 command : |
32- run-go-tests --timeout 45m
32+ # The go tests create a disposable local repo at runtime to execute git commands against, so we need to set any arbitrary options here to avoid an error message
33+ git config --global user.email "[email protected] " 34+ git config --global user.name "Grunty"
35+ - run :
36+ name : run git-xargs tests
37+ command : run-go-tests --timeout 45m
3338 no_output_timeout : 45m
3439 when : always
35- build :
40+ build-and-deploy :
3641 << : *defaults
3742 steps :
3843 - checkout
39- - run :
44+ - run :
4045 << : *install_gruntwork_utils
41- - run : go get github.com/mitchellh/gox
42- # Build and upload binaries for kubergrunt
43- - run :
44- command : |
45- build-go-binaries \
46- --app-name git-xargs \
47- --src-path ./cmd \
48- --dest-path ./bin \
49- --ld-flags "-X main.VERSION=$CIRCLE_TAG -extldflags '-static'"
50- (cd ./bin && sha256sum * > SHA256SUMS)
51- upload-github-release-assets ./bin/*
52- no_output_timeout : 900s
46+ - run : build-go-binaries --app-name git-xargs --src-path ./cmd --dest-path bin --ld-flags "-X main.VERSION=$CIRCLE_TAG"
47+ - run : cd bin && sha256sum * > SHA256SUMS
48+ - run : upload-github-release-assets bin/*
5349workflows :
5450 version : 2
5551 build-and-test :
@@ -60,21 +56,13 @@ workflows:
6056 only : /^v.*/
6157 context :
6258 - Gruntwork Admin
63- - build :
59+ - build-and-deploy :
6460 requires :
6561 - test
6662 filters :
6763 tags :
6864 only : /^v.*/
69- context :
70- - Gruntwork Admin
71- - deploy :
72- requires :
73- - build
74- filters :
75- tags :
76- only : /^v.*/
77- branches :
65+ branches :
7866 ignore : /.*/
7967 context :
8068 - Gruntwork Admin
0 commit comments