Attempt to speed up build time by pulling the old image
This commit is contained in:
parent
93bdb5888e
commit
5ecb68f2e7
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ build-test:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
|
- echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
|
||||||
|
# speed up build time by pulling the old image
|
||||||
|
- docker pull registry.gitlab.com/$CI_PROJECT_NAMESPACE/${CI_PROJECT_NAME}:main
|
||||||
- docker build -t $UNIQUE_IMAGE .
|
- docker build -t $UNIQUE_IMAGE .
|
||||||
- docker push $UNIQUE_IMAGE
|
- docker push $UNIQUE_IMAGE
|
||||||
- docker run --entrypoint /test $UNIQUE_IMAGE
|
- docker run --entrypoint /test $UNIQUE_IMAGE
|
||||||
|
|
@ -38,6 +40,8 @@ build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
|
- echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
|
||||||
|
# speed up build time by pulling the old image
|
||||||
|
- docker pull registry.gitlab.com/$CI_PROJECT_NAMESPACE/${CI_PROJECT_NAME}:main
|
||||||
- docker build --no-cache -t $UNIQUE_IMAGE .
|
- docker build --no-cache -t $UNIQUE_IMAGE .
|
||||||
- docker push $UNIQUE_IMAGE
|
- docker push $UNIQUE_IMAGE
|
||||||
- docker tag $UNIQUE_IMAGE $REF_IMAGE
|
- docker tag $UNIQUE_IMAGE $REF_IMAGE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue