Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Check if we have secrets before decrypting or running smoke tests
Browse files Browse the repository at this point in the history
And enable running CircleCI on forked pull requests
  • Loading branch information
bboreham committed Dec 23, 2016
1 parent 1e7afe3 commit ab55da4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/circle-dependencies-post
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ source "$STATE"
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR

if [ -n "$TEST_AND_PUBLISH" ] ; then
bin/setup-circleci-secrets "$SECRET_PASSWORD"
[ -z "$SECRET_PASSWORD" ] || bin/setup-circleci-secrets "$SECRET_PASSWORD"
cd $SRCDIR; git submodule update --init
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
if [ "$CIRCLE_NODE_INDEX" = "0" -a -n "$SECRET_PASSWORD" ] ; then
cd $SRCDIR/test; ./gce.sh make_template
fi
cd $SRCDIR/build
Expand Down
2 changes: 1 addition & 1 deletion bin/circle-test-pre
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ if [ -n "$TEST_AND_PUBLISH" ] ; then
make COVERAGE=true RM= all

cd $SRCDIR/test
./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh
[ -z "$SECRET_PASSWORD" ] || (./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh)
fi
1 change: 1 addition & 0 deletions bin/circle-test-smoke
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e
source "$STATE"

if [ -n "$TEST_AND_PUBLISH" ] ; then
[ -n "$SECRET_PASSWORD" ] || echo "Cannot run smoke tests: no secret key" && exit 1
cd $SRCDIR/test
eval $(./gce.sh hosts)
export COVERAGE=true
Expand Down
2 changes: 1 addition & 1 deletion bin/circle-test-teardown
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ source "$STATE"

if [ -n "$TEST_AND_PUBLISH" ] ; then
cd $SRCDIR/test
./gce.sh destroy
[ -z "$SECRET_PASSWORD" ] || ./gce.sh destroy
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
fi
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ general:
branches:
ignore:
- gh\-pages
- /pull\/.*/

machine:
services:
Expand Down

0 comments on commit ab55da4

Please sign in to comment.