Skip to content

Commit

Permalink
Fix build (#898)
Browse files Browse the repository at this point in the history
* Bump to go 1.16

* Limit build parallelism

* Add go111module setting

* Use go 1.16.3

* Use working directory in go src dir

* Make sure all jobs have the same working_directory

* Call go mod tidy

* bump hardcoded go version in test fixtures
  • Loading branch information
yorinasub17 authored May 14, 2021
1 parent 08c71fb commit 3af8e92
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
env: &env
environment:
GRUNTWORK_INSTALLER_VERSION: v0.0.34
MODULE_CI_VERSION: v0.29.2
GRUNTWORK_INSTALLER_VERSION: v0.0.36
MODULE_CI_VERSION: v0.33.3
MODULE_GCP_CI_VERSION: v0.1.1
TERRAFORM_VERSION: 0.15.0
TERRAGRUNT_VERSION: v0.28.24
PACKER_VERSION: 1.6.6
GO_VERSION: 1.14
GO_VERSION: 1.16.3
GO111MODULE: auto
K8S_VERSION: v1.15.0 # Same as EKS
MINIKUBE_VERSION: v1.9.2
HELM_VERSION: v3.1.1
KUBECONFIG: /home/circleci/.kube/config
BIN_BUILD_PARALLELISM: 3

defaults: &defaults
machine:
Expand Down Expand Up @@ -107,13 +109,20 @@ jobs:
# binaries to GitHub as release assets.
- run:
command: |
# For some reason, the circleci environment requires additional module dependencies that are not captured by
# our Linux or Mac OSX dev environments. We workaround this by running `go mod tidy` in the CircleCI
# environment so it pulls in what it needs.
go mod tidy
GO_ENABLED=0 build-go-binaries \
--parallel "$BIN_BUILD_PARALLELISM" \
--app-name terratest_log_parser \
--src-path ./cmd/terratest_log_parser \
--dest-path ./cmd/bin \
--ld-flags "-X main.VERSION=$CIRCLE_TAG -extldflags '-static'"
GO_ENABLED=0 build-go-binaries \
--parallel "$BIN_BUILD_PARALLELISM" \
--app-name pick-instance-type \
--src-path ./cmd/pick-instance-type \
--dest-path ./cmd/bin \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<testsuites>
<testsuite tests="52" failures="0" time="1.019" name="github.com/gruntwork-io/terratest/modules/logger/parser">
<properties>
<property name="go.version" value="go1.14"></property>
<property name="go.version" value="go1.16.3"></property>
</properties>
<testcase classname="parser" name="TestStackPush" time="0.000"></testcase>
<testcase classname="parser" name="TestStackPop" time="0.000"></testcase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<testsuites>
<testsuite tests="55" failures="3" time="1.020" name="github.com/gruntwork-io/terratest/modules/logger/parser">
<properties>
<property name="go.version" value="go1.14"></property>
<property name="go.version" value="go1.16.3"></property>
</properties>
<testcase classname="parser" name="TestStackPush" time="0.000"></testcase>
<testcase classname="parser" name="TestStackPop" time="0.000"></testcase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<testsuites>
<testsuite tests="52" failures="4" time="0.020" name="github.com/gruntwork-io/terratest/modules/logger/parser">
<properties>
<property name="go.version" value="go1.14"></property>
<property name="go.version" value="go1.16.3"></property>
</properties>
<testcase classname="parser" name="TestStackPush" time="0.000"></testcase>
<testcase classname="parser" name="TestStackPop" time="0.000"></testcase>
Expand Down

0 comments on commit 3af8e92

Please sign in to comment.