Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): use latest TF version and update rovers default TF path #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FalcoSuessgott
Copy link

Hi,

I havent really followed #69, but this PR is perhaps a smaller fix when using rovers docker image and thus easier to review / merge.

Firstly, Terraform was twice installed (/usr/local/bin/terraform & /bin/terraform) with outdated versions. This PR fixes this, uses the latest stable TF version (v1.5.5) and changes rovers default TF path to match the one in the container (/bin/terraform).

What do you think?

@FalcoSuessgott
Copy link
Author

In order to use rover in Gitlab and host the webserver on Gitlab pages I had to do the following:

pages:
  stage: pages
  image:
    name: im2nguyen/rover
    entrypoint: [""]
  before_script:
    # remove deprecated TF versions
    - rm $(which terraform)
    - rm $(which terraform)
    # install latest TF
    - apk add terraform --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
  script:
    - mkdir public
    - rover -standalone -tfVarsFile=${CI_PROJECT_DIR}/terraform.tfvars -tfPath=$(which terraform) -standalone -planJSONPath="${CI_PROJECT_DIR}/${TF_PROJECT_DIR}/${TF_OUTPUT_DIR}/terraform.plan"
    - mv rover.zip ${CI_PROJECT_DIR}/public/.
    - unzip ${CI_PROJECT_DIR}/public/rover.zip -d ${CI_PROJECT_DIR}/public/.
  artifacts:
    paths:
      - ${CI_PROJECT_DIR}/public/
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

With this PR we would not need the before_script part ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant