Made "dev-" tag to be automatically pushed instead of the version for testing, which will now be manual
This commit is contained in:
@@ -5,14 +5,12 @@ stages:
|
||||
- Build Variants
|
||||
- Push Images
|
||||
|
||||
build-base:
|
||||
0-build-base:
|
||||
stage: Build Base
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- ./images/
|
||||
except:
|
||||
- pushes
|
||||
tags:
|
||||
- docker
|
||||
before_script:
|
||||
@@ -21,7 +19,7 @@ build-base:
|
||||
- docker build --pull --build-arg "GRAV_VERSION=$GRAV_VERSION" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" .
|
||||
- docker save --output "./images/$CI_COMMIT_SHORT_SHA.tar" "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
|
||||
|
||||
build-git:
|
||||
0-build-git:
|
||||
stage: Build Variants
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
@@ -29,8 +27,6 @@ build-git:
|
||||
- ./images/
|
||||
dependencies:
|
||||
- build-base
|
||||
except:
|
||||
- pushes
|
||||
tags:
|
||||
- docker
|
||||
before_script:
|
||||
@@ -39,15 +35,31 @@ build-git:
|
||||
- docker build --build-arg "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA" -f ./variants/Dockerfile-git -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-git" .
|
||||
- docker save --output "./images/$CI_COMMIT_SHORT_SHA-git.tar" "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-git"
|
||||
|
||||
push-version:
|
||||
0-push-dev:
|
||||
stage: Push Images
|
||||
dependencies:
|
||||
- build-base
|
||||
- build-git
|
||||
except:
|
||||
- pushes
|
||||
tags:
|
||||
- docker
|
||||
before_script:
|
||||
- docker load --input "./images/$CI_COMMIT_SHORT_SHA.tar"
|
||||
- docker load --input "./images/$CI_COMMIT_SHORT_SHA-git.tar"
|
||||
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
|
||||
script:
|
||||
- docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" "$CI_REGISTRY_IMAGE:dev-$GRAV_VERSION"
|
||||
- docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA-git" "$CI_REGISTRY_IMAGE:dev-$GRAV_VERSION-git"
|
||||
- docker push "$CI_REGISTRY_IMAGE:dev-$GRAV_VERSION"
|
||||
- docker push "$CI_REGISTRY_IMAGE:dev-$GRAV_VERSION-git"
|
||||
|
||||
1-push-version:
|
||||
stage: Push Images
|
||||
dependencies:
|
||||
- build-base
|
||||
- build-git
|
||||
tags:
|
||||
- docker
|
||||
when: manual
|
||||
before_script:
|
||||
- docker load --input "./images/$CI_COMMIT_SHORT_SHA.tar"
|
||||
- docker load --input "./images/$CI_COMMIT_SHORT_SHA-git.tar"
|
||||
@@ -58,13 +70,11 @@ push-version:
|
||||
- docker push "$CI_REGISTRY_IMAGE:$GRAV_VERSION"
|
||||
- docker push "$CI_REGISTRY_IMAGE:$GRAV_VERSION-git"
|
||||
|
||||
push-latest:
|
||||
2-push-latest:
|
||||
stage: Push Images
|
||||
dependencies:
|
||||
- build-base
|
||||
- build-git
|
||||
except:
|
||||
- pushes
|
||||
tags:
|
||||
- docker
|
||||
when: manual
|
||||
|
||||
Reference in New Issue
Block a user