From 17667d872f718240de62b69b5cd3c68a7cea157f Mon Sep 17 00:00:00 2001 From: pi-unnerup Date: Thu, 30 Jul 2020 17:16:49 +0100 Subject: [PATCH 1/3] fix: tf bundle version --- Dockerfile | 26 ++++++++++--------- .../deployments/AWS/terraform-bundle.hcl | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1646ab42..b50b6293 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,9 @@ ENV PATH $PATH:/go/bin RUN mkdir -p /go/ && \ chdir /go && \ go get -d -v github.com/hashicorp/terraform && \ + chdir /go/src/github.com/hashicorp/terraform && \ + git checkout v0.12.29 && \ + chdir /go && \ go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle COPY ./terraform/deployments/AWS/terraform-bundle.hcl . RUN terraform-bundle package terraform-bundle.hcl && \ @@ -93,18 +96,17 @@ COPY --chown=1000 launch-files/bashrc /app/launch-files/bashrc USER ${lint_user} -# Lint Dockerfiles -RUN hadolint Dockerfile \ - && hadolint attack/Dockerfile \ -# Lint shell scripts - && shellcheck scripts/* \ - && shellcheck attack/scripts/* \ - && shellcheck simulation-scripts/perturb.sh \ - && shellcheck kubesim \ - && shellcheck Bastion/bashrc \ - && shellcheck InternalHost/bashrc \ - && shellcheck Kubernetes/bashrc \ - && shellcheck launch-files/bashrc +# Lint Dockerfiles & shell scripts +RUN hadolint Dockerfile && \ + hadolint attack/Dockerfile && \ + shellcheck scripts/* && \ + shellcheck attack/scripts/* && \ + shellcheck simulation-scripts/perturb.sh && \ + shellcheck kubesim && \ + shellcheck Bastion/bashrc && \ + shellcheck InternalHost/bashrc && \ + shellcheck Kubernetes/bashrc && \ + shellcheck launch-files/bashrc WORKDIR /app/scenario-tools diff --git a/terraform/deployments/AWS/terraform-bundle.hcl b/terraform/deployments/AWS/terraform-bundle.hcl index b31e5c59..75b45609 100644 --- a/terraform/deployments/AWS/terraform-bundle.hcl +++ b/terraform/deployments/AWS/terraform-bundle.hcl @@ -9,4 +9,4 @@ providers { template = ["~> 2.1"] } -# vim: ft=tf +# vim: ft=tf \ No newline at end of file From 776faa9513a96b55aeed98088cb23865458c4f78 Mon Sep 17 00:00:00 2001 From: pi-unnerup Date: Tue, 4 Aug 2020 15:27:18 +0100 Subject: [PATCH 2/3] fix: tf bundle version --- Dockerfile | 12 +++++------- terraform/deployments/AWS/terraform-bundle.hcl | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index b50b6293..2e3b721d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,13 +32,11 @@ ENV PATH $PATH:/usr/local/go/bin # Install terraform ENV GOPATH /go ENV PATH $PATH:/go/bin -RUN mkdir -p /go/ && \ - chdir /go && \ - go get -d -v github.com/hashicorp/terraform && \ - chdir /go/src/github.com/hashicorp/terraform && \ - git checkout v0.12.29 && \ - chdir /go && \ - go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle + +RUN export GO111MODULE=on && \ + mkdir -p /go/ && \ + go get github.com/hashicorp/terraform/tools/terraform-bundle@v0.12.29 + COPY ./terraform/deployments/AWS/terraform-bundle.hcl . RUN terraform-bundle package terraform-bundle.hcl && \ mkdir -p terraform-bundle && \ diff --git a/terraform/deployments/AWS/terraform-bundle.hcl b/terraform/deployments/AWS/terraform-bundle.hcl index 75b45609..b31e5c59 100644 --- a/terraform/deployments/AWS/terraform-bundle.hcl +++ b/terraform/deployments/AWS/terraform-bundle.hcl @@ -9,4 +9,4 @@ providers { template = ["~> 2.1"] } -# vim: ft=tf \ No newline at end of file +# vim: ft=tf From 129dc82e8eae591704ce5668a547e8a39b3dffbe Mon Sep 17 00:00:00 2001 From: pi-unnerup Date: Tue, 4 Aug 2020 15:32:44 +0100 Subject: [PATCH 3/3] fix: go module env --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e3b721d..f5ee9f59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,9 +32,9 @@ ENV PATH $PATH:/usr/local/go/bin # Install terraform ENV GOPATH /go ENV PATH $PATH:/go/bin - -RUN export GO111MODULE=on && \ - mkdir -p /go/ && \ + +ENV GO111MODULE on +RUN mkdir -p /go/ && \ go get github.com/hashicorp/terraform/tools/terraform-bundle@v0.12.29 COPY ./terraform/deployments/AWS/terraform-bundle.hcl .