Move circle commands into shell scripts
This commit is contained in:
1 parent
0c2774f367
commit
b239694d34
9 files changed
+107
-39
No files matched your search
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
sudo apt-get -q update && sudo apt-get -q install bc jq
|
||||||
|
bin/setup-circleci-secrets "$SECRET_PASSWORD"
|
||||||
|
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR
|
||||||
|
cd $SRCDIR; git submodule update --init
|
||||||
|
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
||||||
|
cd $SRCDIR/test; ./gce.sh make_template
|
||||||
|
fi
|
||||||
|
cd $SRCDIR/build
|
||||||
|
../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh
|
||||||
|
touch $SRCDIR/.build.uptodate
|
||||||
|
sudo chown -R ubuntu /usr/local/go
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
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
|
||||||
|
bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
|
cd $SRCDIR
|
||||||
|
make clean-bin
|
||||||
|
make publish
|
||||||
|
|
||||||
|
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
|
||||||
|
bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
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
|
||||||
|
bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD"
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
||||||
|
go get github.com/mattn/goveralls
|
||||||
|
goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci
|
||||||
|
cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS
|
||||||
|
fi
|
||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd $SRCDIR/test
|
||||||
|
eval $(./gce.sh hosts)
|
||||||
|
export COVERAGE=true
|
||||||
|
./run_all.sh
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd $SRCDIR/test
|
||||||
|
./gce.sh destroy
|
||||||
|
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd $SRCDIR
|
||||||
|
make lint
|
||||||
|
COVERDIR=test/coverage make RM= tests
|
||||||
|
make COVERAGE=true RM= all
|
||||||
|
make testrunner
|
||||||
|
|
||||||
|
cd $SRCDIR/test
|
||||||
|
./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh
|
||||||
+15
-39
@@ -17,41 +17,23 @@ dependencies:
|
|||||||
cache_directories:
|
cache_directories:
|
||||||
- "~/docker"
|
- "~/docker"
|
||||||
post:
|
post:
|
||||||
- "sudo apt-get update && sudo apt-get install bc jq"
|
- bin/circle-dependencies-post
|
||||||
- bin/setup-circleci-secrets "$SECRET_PASSWORD"
|
|
||||||
- "mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR"
|
|
||||||
- "cd $SRCDIR; git submodule update --init"
|
|
||||||
- cd $SRCDIR/test; ./gce.sh make_template:
|
|
||||||
parallel: false
|
|
||||||
- "cd $SRCDIR/build; ../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh && touch $SRCDIR/.build.uptodate"
|
|
||||||
- "sudo chown -R ubuntu /usr/local/go"
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
pre:
|
||||||
|
- "$SRCDIR/bin/circle-test-pre":
|
||||||
|
parallel: true
|
||||||
override:
|
override:
|
||||||
- cd $SRCDIR; make lint:
|
- "$SRCDIR/bin/circle-test-override":
|
||||||
parallel: true
|
|
||||||
- cd $SRCDIR; COVERDIR=test/coverage make RM= tests:
|
|
||||||
parallel: true
|
|
||||||
- cd $SRCDIR; make COVERAGE=true RM= exes all:
|
|
||||||
parallel: true
|
|
||||||
- cd $SRCDIR; make testrunner:
|
|
||||||
parallel: true
|
|
||||||
- cd $SRCDIR/test; ./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh:
|
|
||||||
parallel: true
|
|
||||||
- cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh:
|
|
||||||
parallel: true
|
parallel: true
|
||||||
timeout: 300
|
timeout: 300
|
||||||
post:
|
post:
|
||||||
- cd $SRCDIR/test; ./gce.sh destroy:
|
- "$SRCDIR/bin/circle-test-post":
|
||||||
parallel: true
|
|
||||||
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh):
|
|
||||||
parallel: true
|
parallel: true
|
||||||
|
|
||||||
teardown:
|
teardown:
|
||||||
pre:
|
pre:
|
||||||
- test "$CIRCLE_NODE_INDEX" != "0" || (go get github.com/mattn/goveralls && goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci || true):
|
- "$SRCDIR/bin/circle-teardown-pre":
|
||||||
parallel: true
|
|
||||||
- test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS):
|
|
||||||
parallel: true
|
parallel: true
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
@@ -59,20 +41,14 @@ deployment:
|
|||||||
branch: /[0-9]+\.[0-9]+/
|
branch: /[0-9]+\.[0-9]+/
|
||||||
owner: weaveworks
|
owner: weaveworks
|
||||||
commands:
|
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
|
- "$SRCDIR/bin/circle-deploy-release"
|
||||||
- cd $SRCDIR; bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD"
|
master:
|
||||||
hub:
|
|
||||||
branch: master
|
branch: master
|
||||||
owner: weaveworks
|
owner: weaveworks
|
||||||
commands:
|
commands:
|
||||||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
- "$SRCDIR/bin/circle-deploy-master"
|
||||||
- cd $SRCDIR; make clean-bin
|
issues:
|
||||||
- cd $SRCDIR; make exes publish
|
branch: /.*/
|
||||||
# - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get
|
owner: weaveworks
|
||||||
# - cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|
commands:
|
||||||
# issues:
|
- "$SRCDIR/bin/circle-deploy-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; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD"
|
|
||||||
Reference in new issue
Block a user