1

GitLab offers a Project-level Secure Files, the API has you add this to your .gitlab-ci.yml,

test:
  variables:
    SECURE_FILES_DOWNLOAD_PATH: './where/files/should/go/'
  script:
    - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash

However, I'm using the Terraform image which is Alpine without bash which the installer script requires.

How can you use Secure File API if your container doesn't have bash?

1 Answer 1

0

Currently, the only option when your container doesn't have bash is to add it. With Alpine you can do that with apk add bash. You can do that with before_script like this,

test:
  variables:
    SECURE_FILES_DOWNLOAD_PATH: './where/files/should/go/'
  before_script:
    - apk add bash
  script:
    - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.