Commit 101968cb authored by Michal Wasilewski's avatar Michal Wasilewski

Merge branch 'michalw/switch-to-prebuild-docker-image' into 'master'

switch to using prebuilt docker image

See merge request !854
parents 1d2a933b ee9bf6b9
image: "alpine:latest"
image: ""
- format
......@@ -7,21 +7,14 @@ stages:
- deployment
- apk add --no-cache bash build-base ca-certificates curl git gnupg make openssh-client ruby ruby-dev unzip && update-ca-certificates
- gem install --no-rdoc --no-ri terraform_landscape json multi_json
- git clone /.tfenv
- export PATH=/.tfenv/bin:$PATH
- for version in $(find . -name .terraform-version |xargs cat |sort -u); do /.tfenv/bin/tfenv install ${version}; done
# Terraform requires a key file for TF_VAR_ssh_key. We don't really use it
# but it has to be there.
- echo "This is not a real key" > /fake_user_key
- curl -sLO && unzip && mv tflint /bin
stage: format
script: |
set +o pipefail
echo "running tf format" # there's no output for empty builds otherwise
fmt_diff=$(git diff-tree --no-commit-id --name-only -r ${CI_COMMIT_SHA} | grep '\.tf$' | xargs -I{} terraform fmt -write=false {} | sed '/^\s*$/d')
if test -n "$fmt_diff"; then
echo "******* Terraform formatting error:"
......@@ -41,6 +34,7 @@ tf_validate:
script: |
set +o pipefail
echo "running tf validate" # there's no output for empty builds otherwise
# SSH setup for module cloning
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment