Commit 9728e45c authored by nimrod's avatar nimrod
Browse files

Install Terraform for testing purposes.

- Replace the pre-commit try-repo template. The only repo that's using
  it (now that all other repos have been archived) is this. The point of
the template is lost when there's just 1 project using it.
- Install Terraform for the relevant hooks.
parent 0c83218e
Loading
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -2,5 +2,28 @@
include:
  - project: shore/ci-templates
    file: templates/pre-commit.yml
  - project: shore/ci-templates
    file: templates/pre-commit-repo.yml

pre-commit-try-repo:
  stage: test
  image: registry.shore.co.il/ci-images:pre-commit
  tags: [ns4.shore.co.il]
  variables:
    XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
  before_script:
    - >-
      curl https://apt.releases.hashicorp.com/gpg |
      GNUPGHOME=/tmp gpg --dearmor >
      /usr/share/keyrings/hashicorp.gpg
    - . /etc/os-release
    # yamllint disable rule:line-length
    - >-
      echo "deb [ signed-by=/usr/share/keyrings/hashicorp.gpg ] https://apt.releases.hashicorp.com $VERSION_CODENAME main" >
      /etc/apt/sources.list.d/hashicorp.list
    # yamllint enable rule:line-length
    - apt-get update
    - apt-get install -y terraform
  script:
    - pre-commit try-repo --all-files ./
  cache:
    paths:
      - .cache/