1
1
defaults : &defaults
2
- working_directory : /go/src/github.com/gruntwork-io/git-xargs
3
2
docker :
4
3
- 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 :
8
5
TERRATEST_LOG_PARSER_VERSION : NONE
9
6
TERRAFORM_VERSION : NONE
10
7
TERRAGRUNT_VERSION : NONE
11
8
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
13
14
install_gruntwork_utils : &install_gruntwork_utils
14
- name : install gruntwork utils
15
+ name : Install gruntwork utils
15
16
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}"
16
19
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}
21
24
version : 2
22
25
jobs :
23
26
test :
24
27
<< : *defaults
25
28
steps :
26
29
- checkout
27
- - run :
28
- << : *install_gruntwork_utils
29
- - run :
30
- name : run git-args tests
30
+ - run :
31
31
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
33
38
no_output_timeout : 45m
34
39
when : always
35
- build :
40
+ build-and-deploy :
36
41
<< : *defaults
37
42
steps :
38
43
- checkout
39
- - run :
44
+ - run :
40
45
<< : *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/*
53
49
workflows :
54
50
version : 2
55
51
build-and-test :
@@ -60,21 +56,13 @@ workflows:
60
56
only : /^v.*/
61
57
context :
62
58
- Gruntwork Admin
63
- - build :
59
+ - build-and-deploy :
64
60
requires :
65
61
- test
66
62
filters :
67
63
tags :
68
64
only : /^v.*/
69
- context :
70
- - Gruntwork Admin
71
- - deploy :
72
- requires :
73
- - build
74
- filters :
75
- tags :
76
- only : /^v.*/
77
- branches :
65
+ branches :
78
66
ignore : /.*/
79
67
context :
80
68
- Gruntwork Admin
0 commit comments