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
|
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR
|
||||||
|
|
||||||
if [ -n "$TEST_AND_PUBLISH" ] ; then
|
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
|
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
|
cd $SRCDIR/test; ./gce.sh make_template
|
||||||
fi
|
fi
|
||||||
cd $SRCDIR/build
|
cd $SRCDIR/build
|
||||||
|
|||||||
+1
-1
@@ -10,5 +10,5 @@ if [ -n "$TEST_AND_PUBLISH" ] ; then
|
|||||||
make COVERAGE=true RM= all
|
make COVERAGE=true RM= all
|
||||||
|
|
||||||
cd $SRCDIR/test
|
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
|
fi
|
||||||
@@ -5,6 +5,7 @@ set -e
|
|||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
if [ -n "$TEST_AND_PUBLISH" ] ; then
|
if [ -n "$TEST_AND_PUBLISH" ] ; then
|
||||||
|
[ -n "$SECRET_PASSWORD" ] || echo "Cannot run smoke tests: no secret key" && exit 1
|
||||||
cd $SRCDIR/test
|
cd $SRCDIR/test
|
||||||
eval $(./gce.sh hosts)
|
eval $(./gce.sh hosts)
|
||||||
export COVERAGE=true
|
export COVERAGE=true
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ source "$STATE"
|
|||||||
|
|
||||||
if [ -n "$TEST_AND_PUBLISH" ] ; then
|
if [ -n "$TEST_AND_PUBLISH" ] ; then
|
||||||
cd $SRCDIR/test
|
cd $SRCDIR/test
|
||||||
./gce.sh destroy
|
[ -z "$SECRET_PASSWORD" ] || ./gce.sh destroy
|
||||||
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
|
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
|
||||||
fi
|
fi
|
||||||
@@ -2,7 +2,6 @@ general:
|
|||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
- gh\-pages
|
- gh\-pages
|
||||||
- /pull\/.*/
|
|
||||||
|
|
||||||
machine:
|
machine:
|
||||||
services:
|
services:
|
||||||
|
|||||||
Reference in new issue
Block a user