mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
b990f48 Merge pull request #42 from kinvolk/lorenzo/fix-git-diff 224a145 Check if SHA1 exists before calling `git diff` 1c3000d Add auto_apply config for wcloud 0ebf5c0 Fix wcloud -serivice4fe078aMerge pull request #39 from weaveworks/fix-wrong-subtree-use3f4934dRemove generate_latest_map48beb60Sync changes done directly in scope/tools45dcdd5Merge pull request #37 from weaveworks/fix-mflag-missingb895344Use mflag package from weaveworks fork until we find a better solutione030008Merge pull request #36 from weaveworks/wcloud-service-flags9cbab40Add wcloud Makefileef55901Review feedback, and build wcloud in circle.3fe92f5Add wcloud deploy --service flag3527b56Merge pull request #34 from weaveworks/repo-branch92cd0b8[wcloud] Add support for repo_branch option9f760abAllow wcloud users to override username38037f8Merge pull request #33 from weaveworks/wcloud-templates7acfbd7Propagate the local usernamee6876d1Add template fields to wcloud config.f1bb537Merge pull request #30 from weaveworks/mike/shell-lint/dont-error-if-emptye60f5dfMerge pull request #31 from weaveworks/mike/fix-shell-lint-errorse8e2b69integrations: Fix a shellcheck linter errora781575shell-lint: Don't fail if no shell scripts founddb5efc0Merge pull request #28 from weaveworks/mike/add-image-tag5312c40Import image-tag script into build tools so it can be shared7e850f8Fix logs pathdda9785Update deploy apif2f4e5bFix the wcloud client3925eb6Merge pull request #27 from weaveworks/wcloud-events77355b9Lintd9a1c6cAdd wcloud events, update flags and error nicely when there is no config git-subtree-dir: tools git-subtree-split: b990f488bdc7909b62d9245bc4b4caf58f5ae7ea
111 lines
5.3 KiB
YAML
111 lines
5.3 KiB
YAML
general:
|
|
branches:
|
|
ignore:
|
|
- gh-pages
|
|
|
|
machine:
|
|
services:
|
|
- docker
|
|
environment:
|
|
GOPATH: /home/ubuntu
|
|
SRCDIR: /home/ubuntu/src/github.com/weaveworks/scope
|
|
PATH: $PATH:$HOME/.local/bin
|
|
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
|
|
SCOPE_UI_BUILD: $HOME/docker/scope_ui_build.tar
|
|
|
|
dependencies:
|
|
cache_directories:
|
|
- "~/docker"
|
|
override:
|
|
- |
|
|
go get -u github.com/weaveworks/build-tools/cmd/wcloud &&
|
|
sudo apt-get update &&
|
|
sudo apt-get install jq pv &&
|
|
(curl https://sdk.cloud.google.com | bash) &&
|
|
(test -z "$SECRET_PASSWORD" || bin/setup-circleci-secrets "$SECRET_PASSWORD") &&
|
|
make deps &&
|
|
mkdir -p $(dirname $SRCDIR) &&
|
|
cp -r $(pwd)/ $SRCDIR
|
|
- "cd $SRCDIR/client; ../tools/rebuild-image weaveworks/scope-ui-build . Dockerfile package.json webpack.production.config.js .eslintrc .babelrc && touch $SRCDIR/.scope_ui_build.uptodate"
|
|
- "cd $SRCDIR/backend; ../tools/rebuild-image weaveworks/scope-backend-build . Dockerfile build.sh && touch $SRCDIR/.scope_backend_build.uptodate"
|
|
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh make_template):
|
|
parallel: false
|
|
- sudo apt-get update && sudo apt-get install python-pip && sudo pip install awscli
|
|
|
|
test:
|
|
override:
|
|
- cd $SRCDIR; make RM= lint:
|
|
parallel: true
|
|
- cd $SRCDIR; COVERDIR=./coverage make RM= tests:
|
|
parallel: true
|
|
- cd $SRCDIR; make RM= client-test static:
|
|
parallel: true
|
|
- cd $SRCDIR; rm -f prog/scope; if [ "$CIRCLE_NODE_INDEX" = "0" ]; then GOARCH=arm make GO_BUILD_INSTALL_DEPS= RM= prog/scope; else GOOS=darwin make GO_BUILD_INSTALL_DEPS= RM= prog/scope; fi:
|
|
parallel: true
|
|
- cd $SRCDIR; rm -f prog/scope; make RM=:
|
|
parallel: true
|
|
- cd $SRCDIR/extras; ./build_on_circle.sh:
|
|
parallel: true
|
|
- "test -z \"$SECRET_PASSWORD\" || (cd $SRCDIR/integration; ./gce.sh setup && eval $(./gce.sh hosts); ./setup.sh)":
|
|
parallel: true
|
|
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./run_all.sh):
|
|
parallel: true
|
|
timeout: 300
|
|
- cd $SRCDIR/examples/plugins/traffic-control && make .traffic-control.uptodate && docker tag weaveworks/scope-traffic-control-plugin weaveworks/scope-traffic-control-plugin:$(../../../tools/image-tag):
|
|
parallel: true
|
|
post:
|
|
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh destroy):
|
|
parallel: true
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR; ./tools/cover/gather_coverage.sh ./coverage $SRCDIR/coverage):
|
|
parallel: true
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/profile.cov -service=circleci || true):
|
|
parallel: true
|
|
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR; cp coverage.* scope.tar $CIRCLE_ARTIFACTS):
|
|
parallel: true
|
|
|
|
deployment:
|
|
hub:
|
|
branch: master
|
|
commands:
|
|
- |
|
|
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 &&
|
|
docker tag weaveworks/scope:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag) &&
|
|
docker tag weaveworks/scope-traffic-control-plugin:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:latest &&
|
|
docker tag weaveworks/scope-traffic-control-plugin:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:$(./tools/image-tag)
|
|
)) &&
|
|
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope &&
|
|
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag) &&
|
|
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin &&
|
|
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:$(./tools/image-tag) &&
|
|
(test -z "${UI_BUCKET_KEY_ID}" || (
|
|
make ui-upload
|
|
)) &&
|
|
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" != "weaveworks" || (
|
|
wcloud deploy -u circle weaveworks/scope:$(./tools/image-tag)
|
|
))
|
|
)
|
|
hub-dev:
|
|
branch: /^((?!master).)*$/ # not the master branch
|
|
commands:
|
|
- >
|
|
test -z "${DEPLOY_BRANCH}" || test -z "${DOCKER_USER}" || (
|
|
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
|
|
docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:${CIRCLE_BRANCH//\//-} &&
|
|
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:${CIRCLE_BRANCH//\//-}
|
|
)
|
|
# release:
|
|
# branch: /release-[0-9]+\.[0-9]+/
|
|
# owner: weaveworks
|
|
# commands:
|
|
# - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
|
# - cd $SRCDIR; PRODUCT=scope tools/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD"
|
|
# issues:
|
|
# branch: /.*/
|
|
# owner: weaveworks
|
|
# commands:
|
|
# - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
|
# - cd $SRCDIR; PRODUCT=scope tools/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|