Newer
Older
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_HUB_REPO: libresh/discourse
.compute_version: &compute_version
- if [ "$CHANNEL" == "stable" ]; then export FILTER="grep -v beta"; else export FILTER="grep beta"; fi
- export DISCOURSE_VERSION=`wget -qO- https://api.github.com/repos/discourse/discourse/tags | grep name | cut -d'"' -f4 | $FILTER | head -n1`
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
- *compute_version
- export DISCOURSE_MAJOR=`echo $DISCOURSE_VERSION | cut -d"." -f1-3`
- /kaniko/executor --single-snapshot --context . ${DESTINATION} --build-arg DISCOURSE_VERSION=$DISCOURSE_VERSION
test-beta:
extends: .test
variables:
CHANNEL: "beta"
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- export DESTINATION="--destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION}-${DATE} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_VERSION} --destination ${DOCKER_HUB_REPO}:${DISCOURSE_MAJOR} --destination ${DOCKER_HUB_REPO}:${CHANNEL}"
except: []
# bug: the CHANNEL variable is not passed to the Dockerfile.
push-beta:
extends: .push
variables:
CHANNEL: "beta"
#push-stable:
# extends: .push
# variables:
# CHANNEL: "stable"