Skip to content

Commit

Permalink
[IAC-1677] Replace gofmt with goimports (#100)
Browse files Browse the repository at this point in the history
* replace gofmt with goimports

* Attempt to fix up Go path in Circle CI build

Co-authored-by: Zachary Proser <[email protected]>
  • Loading branch information
ina-stoyanova and zackproser authored Jul 12, 2021
1 parent 0fa76db commit 80ce781
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ env: &env
TERRAFORM_VERSION: NONE
TERRAGRUNT_VERSION: NONE
PACKER_VERSION: NONE
GOLANG_VERSION: 1.13
GOLANG_VERSION: 1.16
GO111MODULE: auto
KUBECONFIG: /home/circleci/.kube/config

install_helm_client: &install_helm_client
Expand Down Expand Up @@ -53,13 +54,19 @@ jobs:
# Install gruntwork utilities
- run:
<<: *install_gruntwork_utils
# Export go install location to $PATH so it is available in subsequent steps
- run:
command: |
echo "export PATH=/usr/local/go/bin:$PATH" >> $BASH_ENV
- run:
<<: *install_helm_client
# Fail the build if the pre-commit hooks don't pass. Note: if you run pre-commit install locally, these hooks will
# execute automatically every time before you commit, ensuring the build never fails at this step!
- run:
command: |
pip install pre-commit
# Go's location was added to the PATH above
go get golang.org/x/tools/cmd/goimports
pre-commit install
pre-commit run --all-files
- persist_to_workspace:
Expand Down Expand Up @@ -128,29 +135,29 @@ workflows:
version: 2
test-and-deploy:
jobs:
- setup:
filters:
tags:
only: /^v.*/
context:
- Gruntwork Admin
- setup:
filters:
tags:
only: /^v.*/
context:
- Gruntwork Admin

- test:
requires:
- setup
filters:
tags:
only: /^v.*/
context:
- Gruntwork Admin
- test:
requires:
- setup
filters:
tags:
only: /^v.*/
context:
- Gruntwork Admin

- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
context:
- Gruntwork Admin
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
context:
- Gruntwork Admin

0 comments on commit 80ce781

Please sign in to comment.