c00ca1942a
Both of these are behind 'only' flags to avoid pointless rebuilding
45 lines
925 B
YAML
45 lines
925 B
YAML
image: docker
|
|
|
|
stages:
|
|
- default
|
|
|
|
variables:
|
|
USER: shockrah
|
|
|
|
before_script:
|
|
- docker login --username $USER --password $PASS
|
|
|
|
|
|
build-freechat-prod:
|
|
# Can't use variables section here due to the sub shell being invoked here
|
|
before_script:
|
|
- export VERSION="$(date +%d-%m-%Y)"
|
|
|
|
stage: default
|
|
only:
|
|
refs:
|
|
- master
|
|
changes:
|
|
- Freechat/Dockerfile
|
|
script:
|
|
- cd Freechat/
|
|
- echo $VERSION
|
|
- docker build -t freechat .
|
|
- docker tag freechat "$USER/freechat:$VERSION"
|
|
- docker push "$USER/freechat:$VERSION"
|
|
|
|
|
|
build-freechat-pipeline:
|
|
stage: default
|
|
only:
|
|
refs:
|
|
- master
|
|
changes:
|
|
- freechat-pipeline/entrypoint.sh
|
|
- freechat-pipeline/Dockerfile
|
|
script:
|
|
- cd freechat-pipeline/
|
|
- docker build -t freechat-pipeline .
|
|
- docker tag freechat-pipeline "$USER/freechat-pipeline:latest"
|
|
- docker push "$USER/freechat-pipeline:latest"
|