Skip to content
Snippets Groups Projects
Commit 79d6afaf authored by Matthew K Defenderfer's avatar Matthew K Defenderfer
Browse files

move around which job is downloading the secure files and which isn;t

parent de49d582
No related branches found
No related tags found
No related merge requests found
...@@ -7,20 +7,17 @@ stages: ...@@ -7,20 +7,17 @@ stages:
- pre-build - pre-build
- build - build
variables:
SECURE_FILES_DOWNLOAD_PATH: '.secure'
get-credentials: get-credentials:
stage: pre-build stage: pre-build
image: ubuntu:jammy image: ubuntu:jammy
variables:
SECURE_FILES_DOWNLOAD_PATH: '.secure'
before_script: before_script:
- apt-get update && apt-get upgrade -y && apt-get install curl -y - apt-get update && apt-get upgrade -y && apt-get install curl -y
script: script:
- echo "Copying secure file with FeBio login ..." - echo "Copying secure file with FeBio login ..."
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- export USERNAME=$(grep 'username:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- export PASSWORD=$(grep 'password:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- echo "Extracted username $USERNAME"
- echo "Extracted password $PASSWORD"
docker-build: docker-build:
stage: build stage: build
...@@ -30,6 +27,8 @@ docker-build: ...@@ -30,6 +27,8 @@ docker-build:
dependencies: dependencies:
- get-credentials - get-credentials
script: script:
- export USERNAME=$(grep 'username:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- export PASSWORD=$(grep 'password:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- docker pull $CI_REGISTRY_IMAGE:latest || true - docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest . - docker build --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment