-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
465daa9
commit 0bf29a3
Showing
15 changed files
with
559 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
local.test | ||
local.env | ||
local.ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# behat.yml | ||
default: | ||
suites: | ||
default: | ||
paths: | ||
- features | ||
contexts: | ||
- Drupal\DrupalExtension\Context\DrupalContext | ||
- Drupal\DrupalExtension\Context\MinkContext | ||
- FeatureContext | ||
extensions: | ||
Behat\MinkExtension: | ||
# base_url set by ENV | ||
goutte: ~ | ||
Drupal\DrupalExtension: | ||
blackbox: ~ | ||
api_driver: 'drush' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Echo commands as they are executed, but don't allow errors to stop the script. | ||
set -x | ||
|
||
if [ -z "$TERMINUS_SITE" ] || [ -z "$TERMINUS_ENV" ]; then | ||
echo "TERMINUS_SITE and TERMINUS_ENV environment variables must be set" | ||
exit 1 | ||
fi | ||
|
||
# Only delete old environments if there is a pattern defined to | ||
# match environments eligible for deletion. Otherwise, delete the | ||
# current multidev environment immediately. | ||
# | ||
# To use this feature, set MULTIDEV_DELETE_PATTERN to '^ci-' or similar | ||
# in the CI server environment variables. | ||
if [ -z "$MULTIDEV_DELETE_PATTERN" ] ; then | ||
terminus env:delete $TERMINUS_SITE.$TERMINUS_ENV --delete-branch --yes | ||
exit 0 | ||
fi | ||
|
||
# List all but the newest two environments. | ||
OLDEST_ENVIRONMENTS=$(terminus env:list "$TERMINUS_SITE" --format=list | grep -v dev | grep -v test | grep -v live | sort -k2 | grep "$MULTIDEV_DELETE_PATTERN" | sed -e '$d' | sed -e '$d') | ||
|
||
# Exit if there are no environments to delete | ||
if [ -z "$OLDEST_ENVIRONMENTS" ] ; then | ||
exit 0 | ||
fi | ||
|
||
# Go ahead and delete the oldest environments. | ||
for ENV_TO_DELETE in $OLDEST_ENVIRONMENTS ; do | ||
terminus env:delete $TERMINUS_SITE.$ENV_TO_DELETE --delete-branch --yes | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
version: 2 | ||
jobs: | ||
test: | ||
docker: | ||
- image: quay.io/pantheon-public/build-tools-ci:8.x-php7.4 | ||
working_directory: ~/work/d7 | ||
environment: | ||
TZ: "/usr/share/zoneinfo/America/Los_Angeles" | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- run: | ||
name: Set up environment | ||
command: ./.circleci/set-up-globals.sh | ||
- run: | ||
name: Prepare | ||
command: ./.circleci/prepare.sh | ||
- run: | ||
name: Test | ||
command: ./.circleci/test.sh --strict | ||
- run: | ||
name: Cleanup | ||
command: ./.circleci/cleanup.sh | ||
- run: | ||
name: Confirm that it is safe to merge | ||
command: ./.circleci/confirm-safety.sh | ||
merge: | ||
docker: | ||
- image: quay.io/getpantheon/upstream-update-build:1.x | ||
working_directory: ~/work/d7 | ||
environment: | ||
TZ: "/usr/share/zoneinfo/America/Los_Angeles" | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "f8:c0:e1:28:4d:f9:1a:01:aa:7f:d0:8c:f6:e1:e6:88" | ||
- run: | ||
# https://github.com/pantheon-systems/upstream-update-build/blob/1.x/bin/automerge.sh | ||
name: Merge the default branch back to the master branch | ||
command: automerge.sh | ||
|
||
workflows: | ||
version: 2 | ||
drops7: | ||
jobs: | ||
- test | ||
- merge: | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# The purpose of this script is to examine the base branch that this PR is | ||
# set to merge into by usig the GitHub API. We are only querying a public | ||
# repo here, so we do not need to use the GITHUB_TOKEN. | ||
# | ||
|
||
# Exit if we are not running on Circle CI. | ||
if [ -z "$CIRCLECI" ] ; then | ||
exit 0 | ||
fi | ||
|
||
# We only need to make this check for branches forked from default (right) / master (wrong). | ||
# Skip the test for the default branch. (The .circleci directory will never be added to the master branch). | ||
if [ "$CIRCLE_BRANCH" == "default" ] ; then | ||
exit 0 | ||
fi | ||
|
||
# We cannot continue unless we have a pull request. | ||
if [ -z "$CIRCLE_PULL_REQUEST" ] ; then | ||
echo "No CIRCLE_PULL_REQUEST defined; please create a pull request." | ||
exit 1 | ||
fi | ||
|
||
# CIRCLE_PULL_REQUEST=https://github.com/ORG/PROJECT/pull/NUMBER | ||
PR_NUMBER=$(echo $CIRCLE_PULL_REQUEST | sed -e 's#.*/pull/##') | ||
|
||
# Display the API call we are using | ||
echo curl https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER | ||
|
||
base=$(curl https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER 2>/dev/null | jq .base.ref) | ||
|
||
echo "The base branch is $base" | ||
|
||
# If the PR merges into 'default', then it is safe to merge. | ||
if [ "$base" == '"default"' ] ; then | ||
echo "It is safe to merge this PR into the $base branch" | ||
exit 0 | ||
fi | ||
|
||
# Force a test failure if the PR's base is the master branch. | ||
if [ "$base" == '"master"' ] ; then | ||
echo "ERROR: merging this PR into the $base branch is not allowed. Change the base branch for the PR to merge into the \"default\" branch instead." | ||
exit 1 | ||
fi | ||
|
||
echo "Merging probably okay, if you are merging one PR into another. Use caution; do not merge to the \"master\" branch." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Feature: Installer | ||
In order to know that we can install the site via drush | ||
As a website user | ||
I need to be able to install a Drupal site | ||
|
||
Scenario: Installer is ready | ||
Given I have wiped the site | ||
And I have reinstalled "CI Drops-7 [{site-name}.{env}]" | ||
And I visit "/" | ||
Then I should see "Welcome to CI Drops-7" |
Oops, something went wrong.
0bf29a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created multidev environment ci-500 for ci-update-drops-7.