Check if we have secrets before decrypting or running smoke tests
And enable running CircleCI on forked pull requests
This commit is contained in:
1 parent
1e7afe3bec
commit
ab55da47b6
5 files changed
+5
-5
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -2,7 +2,6 @@ general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh\-pages
|
||||
- /pull\/.*/
|
||||
|
||||
machine:
|
||||
services:
|
||||
|
||||
Reference in new issue
Block a user