mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
circle.yml: deploy master with non-upstream hub accounts (#1655)
* circle.yml: deploy master with non-upstream hub accounts
Since b4abe582f4, images are tagged on
Docker Hub. But this was not working for non-upstream Docker Hub
accounts. This patch should fix that.
Symptoms: https://circleci.com/gh/kinvolk/scope/23
> The push refers to a repository [docker.io/kinvolk/scope] (len: 1)
> error getting tags for kinvolk/scope: Tag does not exist for
> master-b89e9ec
Also, ensure that the Docker tag name does not include any '/'.
Symptoms: https://circleci.com/gh/kinvolk/scope/24
> docker tag weaveworks/scope weaveworks/scope:alban/hub1-ef739d9
> repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"
* extras/in_parallel.sh: ensure unique schedule name
Use CircleCI environment variables as documented on:
https://circleci.com/docs/environment-variables/
Symptoms:
> $ cd $SRCDIR/extras; ./build_on_circle.sh
> Doing graphviz/graphviz
> make: *** No rule to make target `graphviz/graphviz'. Stop.
See: https://github.com/weaveworks/scope/pull/1655#issuecomment-232696357
* circle.yml: separate wcloud deployment
Do not run wcloud for non-weaveworks builds, as suggested by
https://github.com/weaveworks/scope/pull/1655#discussion_r71179373
This commit is contained in:
14
circle.yml
14
circle.yml
@@ -67,10 +67,12 @@ deployment:
|
||||
- |
|
||||
test -z "${DOCKER_USER}" || (
|
||||
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
|
||||
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" == "weaveworks" || docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:latest) &&
|
||||
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" == "weaveworks" || (
|
||||
docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:latest &&
|
||||
docker tag weaveworks/scope:$(./image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./image-tag)
|
||||
)) &&
|
||||
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope &&
|
||||
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./image-tag) &&
|
||||
wcloud deploy ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./image-tag)
|
||||
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./image-tag)
|
||||
)
|
||||
hub-dev:
|
||||
branch: /^((?!master).)*$/ # not the master branch
|
||||
@@ -81,6 +83,12 @@ deployment:
|
||||
docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:${CIRCLE_BRANCH//\//-} &&
|
||||
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:${CIRCLE_BRANCH//\//-}
|
||||
)
|
||||
wcloud-weaveworks:
|
||||
branch: master
|
||||
owner: weaveworks
|
||||
commands:
|
||||
- |
|
||||
wcloud deploy weaveworks/scope:$(./image-tag)
|
||||
# release:
|
||||
# branch: /release-[0-9]+\.[0-9]+/
|
||||
# owner: weaveworks
|
||||
|
||||
@@ -18,7 +18,8 @@ COMMAND=$1
|
||||
shift 1
|
||||
|
||||
INPUTS="$*"
|
||||
INPUTS=$(echo $INPUTS | "../tools/sched" sched parallel-$CIRCLE_BUILD_NUM $CIRCLE_NODE_TOTAL $CIRCLE_NODE_INDEX)
|
||||
SCHED_NAME=parallel-$CIRCLE_PROJECT_USERNAME-$CIRCLE_PROJECT_REPONAME-$CIRCLE_BUILD_NUM
|
||||
INPUTS=$(echo $INPUTS | "../tools/sched" sched $SCHED_NAME $CIRCLE_NODE_TOTAL $CIRCLE_NODE_INDEX)
|
||||
|
||||
echo Doing $INPUTS
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@ WORKING_SUFFIX=$(if ! git diff --exit-code --quiet HEAD >&2; \
|
||||
else echo ""; \
|
||||
fi)
|
||||
BRANCH_PREFIX=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "$BRANCH_PREFIX-$(git rev-parse --short HEAD)$WORKING_SUFFIX"
|
||||
echo "${BRANCH_PREFIX//\//-}-$(git rev-parse --short HEAD)$WORKING_SUFFIX"
|
||||
|
||||
Reference in New Issue
Block a user