diff --git a/bin/behat-cleanup.sh b/bin/behat-cleanup.sh index 895a74e..0c7b955 100755 --- a/bin/behat-cleanup.sh +++ b/bin/behat-cleanup.sh @@ -4,7 +4,7 @@ # Delete the Pantheon site environment after the Behat test suite has run. ### -terminus auth whoami > /dev/null +terminus auth:whoami > /dev/null if [ $? -ne 0 ]; then echo "Terminus unauthenticated; assuming unauthenticated build" exit 0 @@ -20,4 +20,4 @@ fi ### # Delete the environment used for this test run. ### -yes | terminus site delete-env --remove-branch +terminus multidev:delete $SITE_ENV --delete-branch --yes diff --git a/bin/behat-prepare.sh b/bin/behat-prepare.sh index a4dac3c..53ec35c 100755 --- a/bin/behat-prepare.sh +++ b/bin/behat-prepare.sh @@ -6,7 +6,7 @@ # such that it can be run a second time if a step fails. ### -terminus auth whoami > /dev/null +terminus auth:whoami > /dev/null if [ $? -ne 0 ]; then echo "Terminus unauthenticated; assuming unauthenticated build" exit 0 @@ -22,13 +22,13 @@ fi ### # Create a new environment for this particular test run. ### -terminus site create-env --to-env=$TERMINUS_ENV --from-env=dev -yes | terminus site wipe +terminus env:create $TERMINUS_SITE.dev $TERMINUS_ENV +terminus env:wipe $SITE_ENV --yes ### # Get all necessary environment details. ### -PANTHEON_GIT_URL=$(terminus site connection-info --field=git_url) +PANTHEON_GIT_URL=$(terminus connection:info $SITE_ENV --field=git_url) PANTHEON_SITE_URL="$TERMINUS_ENV-$TERMINUS_SITE.pantheonsite.io" PREPARE_DIR="/tmp/$TERMINUS_ENV-$TERMINUS_SITE" BASH_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -37,7 +37,7 @@ SIMPLESAMLPHP_VERSION='1.14.8' ### # Switch to git mode for pushing the files up ### -terminus site set-connection-mode --mode=git +terminus connection:set $SITE_ENV git rm -rf $PREPARE_DIR git clone -b $TERMINUS_ENV $PANTHEON_GIT_URL $PREPARE_DIR @@ -128,7 +128,7 @@ sleep 10 ### # Silence output so as not to show the password. { - terminus wp "core install --title=$TERMINUS_ENV-$TERMINUS_SITE --url=$PANTHEON_SITE_URL --admin_user=$WORDPRESS_ADMIN_USERNAME --admin_email=$WORDPRESS_ADMIN_EMAIL --admin_password=$WORDPRESS_ADMIN_PASSWORD" + terminus wp $SITE_ENV -- core install --title=$TERMINUS_ENV-$TERMINUS_SITE --url=$PANTHEON_SITE_URL --admin_user=$WORDPRESS_ADMIN_USERNAME --admin_email=$WORDPRESS_ADMIN_EMAIL --admin_password=$WORDPRESS_ADMIN_PASSWORD } &> /dev/null -terminus wp "plugin activate wp-native-php-sessions wp-saml-auth" -terminus wp "theme activate $TERMINUS_SITE" +terminus wp $SITE_ENV -- plugin activate wp-native-php-sessions wp-saml-auth +terminus wp $SITE_ENV -- theme activate $TERMINUS_SITE diff --git a/bin/behat-test.sh b/bin/behat-test.sh index e8c4f52..6931b0f 100755 --- a/bin/behat-test.sh +++ b/bin/behat-test.sh @@ -4,7 +4,7 @@ # Execute the Behat test suite against a prepared Pantheon site environment. ### -terminus auth whoami > /dev/null +terminus auth:whoami > /dev/null if [ $? -ne 0 ]; then echo "Terminus unauthenticated; assuming unauthenticated build" exit 0 diff --git a/circle.yml b/circle.yml index c512505..4f66f8a 100644 --- a/circle.yml +++ b/circle.yml @@ -5,6 +5,7 @@ machine: environment: TERMINUS_ENV: ci-$CIRCLE_BUILD_NUM TERMINUS_SITE: wp-saml-auth + SITE_ENV: $TERMINUS_SITE.$TERMINUS_ENV WORDPRESS_ADMIN_USERNAME: pantheon # A random password is set in the dependencies:pre stage as a text file. # This line reads the same file repeatedly. If the openssl call were used @@ -12,6 +13,7 @@ machine: # line of other steps. Each CircleCI command runs in a separate shell. WORDPRESS_ADMIN_PASSWORD: $(cat ~/WORDPRESS_ADMIN_PASSWORD) WORDPRESS_ADMIN_EMAIL: no-reply@getpantheon.com + PATH: $PATH:~/terminus/bin dependencies: cache_directories: @@ -38,9 +40,10 @@ dependencies: echo "TERMINUS_TOKEN environment variables missing; assuming unauthenticated build" exit 0 fi - composer global require pantheon-systems/terminus ">=0.13.3 <0.99" composer install - terminus auth login --machine-token=$TERMINUS_TOKEN + git clone --branch master https://github.com/pantheon-systems/terminus.git ~/terminus + cd ~/terminus && composer install + terminus auth:login --machine-token=$TERMINUS_TOKEN test: pre: