mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
* 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
33 lines
709 B
Bash
Executable File
33 lines
709 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage: $0 <cmd> [args...]"
|
|
echo " Will run cmd arg1, cmd arg2 etc on different circle shared,"
|
|
echo " based on what the scheduler says."
|
|
exit 2
|
|
fi
|
|
|
|
if [ -z "$CIRCLECI" ]; then
|
|
echo "I'm afraid this only works when run on CircleCI"
|
|
exit 1
|
|
fi
|
|
|
|
COMMAND=$1
|
|
shift 1
|
|
|
|
INPUTS="$*"
|
|
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
|
|
|
|
for INPUT in $INPUTS; do
|
|
START=$(date +%s)
|
|
$COMMAND $INPUT
|
|
RUNTIME=$(( $(date +%s) - $START ))
|
|
|
|
"../tools/sched" time $INPUT $RUNTIME
|
|
done
|