├── .github └── workflows │ ├── build_and_push.yml │ └── build_only.yml ├── .gitignore ├── CODEOWNERS ├── Dockerfile ├── README.md ├── catalog-info.yaml ├── patches └── 641.diff └── scripts └── set-environment /.github/workflows/build_and_push.yml: -------------------------------------------------------------------------------- 1 | name: Docker Build Tools Image (Build and Push) 2 | on: 3 | push: 4 | branches: 5 | - '9.x' 6 | jobs: 7 | docker-build: 8 | runs-on: ubuntu-latest 9 | name: Build and push ${{ matrix.php-versions }} Docker image 10 | strategy: 11 | matrix: 12 | php-versions: ['8.2', '8.3', '8.4'] 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | - name: Set up QEMU 17 | uses: docker/setup-qemu-action@v1 18 | - name: Set up Docker Buildx 19 | uses: docker/setup-buildx-action@v1 20 | - 21 | name: Login to DockerHub 22 | uses: docker/login-action@v1 23 | with: 24 | username: ${{ secrets.DOCKERHUB_USERNAME }} 25 | password: ${{ secrets.DOCKERHUB_TOKEN }} 26 | - name: Login to Quay 27 | uses: docker/login-action@v1 28 | with: 29 | registry: quay.io 30 | username: ${{ secrets.QUAY_USERNAME }} 31 | password: ${{ secrets.QUAY_PASSWORD }} 32 | - name: Build and push 33 | uses: docker/build-push-action@v2 34 | with: 35 | context: . 36 | push: true 37 | tags: | 38 | pantheonpublic/build-tools-ci:9.x-php${{ matrix.php-versions }} 39 | quay.io/pantheon-public/build-tools-ci:9.x-php${{ matrix.php-versions }} 40 | build-args: | 41 | PHPVERSION=${{ matrix.php-versions }} 42 | -------------------------------------------------------------------------------- /.github/workflows/build_only.yml: -------------------------------------------------------------------------------- 1 | name: Docker Build Tools Image (Build Only) 2 | on: 3 | push: 4 | branches-ignore: 5 | - '8.x' 6 | - '9.x' 7 | jobs: 8 | docker-build: 9 | runs-on: ubuntu-latest 10 | name: Build and push ${{ matrix.php-versions }} Docker image 11 | strategy: 12 | matrix: 13 | php-versions: ['8.2', '8.3', '8.4'] 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2 17 | - name: Set up QEMU 18 | uses: docker/setup-qemu-action@v1 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@v1 21 | - 22 | name: Login to DockerHub 23 | uses: docker/login-action@v1 24 | with: 25 | username: ${{ secrets.DOCKERHUB_USERNAME }} 26 | password: ${{ secrets.DOCKERHUB_TOKEN }} 27 | - name: Login to Quay 28 | uses: docker/login-action@v1 29 | with: 30 | registry: quay.io 31 | username: ${{ secrets.QUAY_USERNAME }} 32 | password: ${{ secrets.QUAY_PASSWORD }} 33 | - name: Build only 34 | uses: docker/build-push-action@v2 35 | with: 36 | context: . 37 | push: false 38 | tags: | 39 | pantheonpublic/build-tools-ci:9.x-php${{ matrix.php-versions }} 40 | quay.io/pantheon-public/build-tools-ci:9.x-php${{ matrix.php-versions }} 41 | build-args: | 42 | PHPVERSION=${{ matrix.php-versions }} 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # https://help.github.com/en/articles/about-code-owners 2 | 3 | # slack: #ask-cms-ecosystem 4 | # Confluence: https://getpantheon.atlassian.net/wiki/spaces/VULCAN/pages/1939375006/Lifecycle+Operations 5 | # Github: https://github.com/orgs/pantheon-systems/teams/developer-experience 6 | 7 | * @pantheon-systems/developer-experience 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHPVERSION=8.4 2 | 3 | # Use an official Python runtime as a parent image 4 | FROM cimg/php:${PHPVERSION}-browsers 5 | 6 | # We need an ARG declaration after the FROM so that it can be used below. 7 | ARG PHPVERSION 8 | 9 | # Switch to root user 10 | USER root 11 | 12 | # Setup apt keys and install google-chrome. 13 | RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \ 14 | curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ 15 | apt update -y && \ 16 | apt install -y google-chrome-stable 17 | 18 | # Install necessary packages for PHP extensions 19 | RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ 20 | apt-get update && \ 21 | apt-get install -y \ 22 | dnsutils \ 23 | libmagickwand-dev \ 24 | libzip-dev \ 25 | libsodium-dev \ 26 | libpng-dev \ 27 | libfreetype6-dev \ 28 | zlib1g-dev \ 29 | libicu-dev \ 30 | libxml2-dev \ 31 | g++ \ 32 | git 33 | 34 | # Add necessary PHP Extensions 35 | RUN pecl config-set php_ini /usr/local/etc/php/php.ini && \ 36 | pear config-set php_ini /usr/local/etc/php/php.ini && \ 37 | pecl channel-update pecl.php.net 38 | 39 | ADD patches/641.diff /tmp/641.diff 40 | 41 | RUN apt-get install -y \ 42 | libmagickwand-dev --no-install-recommends \ 43 | && pecl install imagick \ 44 | && docker-php-ext-enable imagick 45 | 46 | RUN pecl install pcov 47 | RUN docker-php-ext-enable pcov 48 | 49 | RUN pecl install xdebug 50 | RUN docker-php-ext-enable xdebug 51 | 52 | # Set the memory limit to unlimited for expensive Composer interactions 53 | RUN echo "memory_limit=-1" > /usr/local/etc/php/conf.d/memory.ini 54 | 55 | ########################### 56 | # Install build tools things 57 | ########################### 58 | 59 | # Set the working directory to /build-tools-ci 60 | WORKDIR /build-tools-ci 61 | 62 | # Copy the current directory contents into the container at /build-tools-ci 63 | ADD . /build-tools-ci 64 | 65 | # Collect the components we need for this image 66 | RUN apt-get update 67 | RUN apt-get install -y ruby jq curl rsync hub 68 | RUN gem install public_suffix -v 5.1.1 && gem install circle-cli 69 | 70 | # Make sure we are on the latest version of Composer 71 | RUN composer selfupdate --2 72 | 73 | # Add lab in case anyone wants to automate GitLab MR creation, etc. 74 | RUN curl -s https://raw.githubusercontent.com/zaquestion/lab/master/install.sh | bash 75 | 76 | # Avoid git errors with safe.directory as user root. 77 | RUN git config --global --add safe.directory '*' 78 | 79 | # Create an unpriviliged test user 80 | # Group 999 already exists on base image (docker). 81 | RUN useradd -r -m -u 999 -g 999 tester && \ 82 | adduser tester sudo && \ 83 | echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ 84 | chown -R tester /usr/local && \ 85 | chown -R tester /build-tools-ci 86 | USER tester 87 | 88 | # Avoid git errors with safe.directory as user tester. 89 | RUN git config --global --add safe.directory '*' 90 | 91 | # Install terminus 92 | RUN curl -L https://github.com/pantheon-systems/terminus/releases/download/4.0.0/terminus.phar -o /usr/local/bin/terminus && \ 93 | chmod +x /usr/local/bin/terminus 94 | RUN terminus self:update 95 | 96 | # Install Drush. 97 | # It is recommended that you configure the PATH in your CI to include `vendor/bin` earlier 98 | # than `/usr/local/bin`. This will ensure that the site-local Drush is called first, and 99 | # the old Drush 10 global install (provided here for b/c) is not used. 100 | RUN mkdir -p /usr/local/share/drush 101 | RUN /usr/bin/env composer -n --working-dir=/usr/local/share/drush require drush/drush "^10" 102 | RUN ln -fs /usr/local/share/drush/vendor/drush/drush/drush /usr/local/bin/drush 103 | 104 | # Add a collection of useful Terminus plugins 105 | RUN terminus self:plugin:add terminus-build-tools-plugin 106 | RUN terminus self:plugin:add terminus-secrets-manager-plugin 107 | RUN terminus self:plugin:add terminus-secrets-plugin 108 | RUN terminus self:plugin:add terminus-rsync-plugin 109 | RUN terminus self:plugin:add terminus-composer-plugin 110 | RUN terminus self:plugin:add terminus-mass-update 111 | RUN terminus self:plugin:add terminus-site-clone-plugin 112 | 113 | ENV TERMINUS_PLUGINS_DIR=/home/tester/.terminus/plugins-4.x 114 | ENV TERMINUS_DEPENDENCIES_BASE_DIR=/home/tester/.terminus/terminus-dependencies 115 | 116 | # Add phpcs for use in checking code style 117 | RUN mkdir ~/phpcs && cd ~/phpcs && COMPOSER_BIN_DIR=/usr/local/bin composer require squizlabs/php_codesniffer:^2.7 118 | 119 | # Add phpunit for unit testing 120 | RUN mkdir ~/phpunit && cd ~/phpunit && COMPOSER_BIN_DIR=/usr/local/bin composer require phpunit/phpunit 121 | 122 | # Add bats for functional testing 123 | RUN git clone https://github.com/sstephenson/bats.git; bats/install.sh /usr/local 124 | 125 | # Add Behat for more functional testing 126 | RUN mkdir ~/behat && \ 127 | cd ~/behat && \ 128 | COMPOSER_BIN_DIR=/usr/local/bin \ 129 | composer require \ 130 | "behat/behat:^3.5" \ 131 | "behat/mink:*" \ 132 | "behat/mink-extension:^2.2" \ 133 | "behat/mink-goutte-driver:^1.2" \ 134 | "drupal/drupal-extension:*" 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Build Tools CI 2 | 3 | [![docker pull quay.io/pantheon-public/build-tools-ci](https://img.shields.io/badge/image-quay-blue.svg)](https://quay.io/repository/pantheon-public/build-tools-ci) 4 | [![Actively Maintained](https://img.shields.io/badge/Pantheon-Actively_Maintained-yellow?logo=pantheon&color=FFDC28)](https://pantheon.io/docs/oss-support-levels#actively-maintained-support) 5 | 6 | [![Docker Hub pantheonpublic/build-tools-ci](https://img.shields.io/docker/pulls/pantheonpublic/build-tools-ci)](https://hub.docker.com/repository/docker/pantheonpublic/build-tools-ci) 7 | 8 | This is the source Dockerfile for the [pantheon-public/build-tools-ci](https://quay.io/repository/pantheon-public/build-tools-ci) and [pantheonpublic/build-tools-ci](https://hub.docker.com/repository/docker/pantheonpublic/build-tools-ci) docker image. 9 | 10 | ## Image Contents 11 | 12 | - [CircleCI PHP 7.3, Node, Headless browser Docker base image](https://hub.docker.com/r/circleci/php) 13 | - [Terminus](https://github.com/pantheon-systems/terminus) 14 | - Terminus plugins 15 | - [Terminus Build Tools Plugin](https://github.com/pantheon-systems/terminus-build-tools-plugin) 16 | - [Terminus Secrets Manager Plugin](https://github.com/pantheon-systems/terminus-secrets-manager-plugin) 17 | - [Terminus Rsync Plugin](https://github.com/pantheon-systems/terminus-rsync-plugin) 18 | - [Terminus Composer Plugin](https://github.com/pantheon-systems/terminus-composer-plugin) 19 | - [Terminus Mass Update Plugin](https://github.com/pantheon-systems/terminus-mass-update) 20 | - [Terminus Site Clone Plugin](https://github.com/pantheon-systems/terminus-site-clone-plugin) 21 | - Test tools 22 | - headless chrome 23 | - phpunit 24 | - bats 25 | - behat 26 | - php_codesniffer 27 | - hub 28 | - lab 29 | - Test scripts 30 | 31 | ## Branches 32 | 33 | - 9.x: Terminus 4. Produces: 34 | - 9.x-php8.2 35 | - 9.x-php8.3 36 | - 9.x-php8.4 37 | - 8.x: Terminus 3. Produces: 38 | - 8.x-php7.4 39 | - 8.x-php8.0 40 | - 8.x-php8.1 41 | - 8.x-php8.2 42 | - 8.x-php8.3 43 | 44 | Branches 7.x and lower are deprecated and unsupported. 45 | 46 | ## 9.x Docker images 47 | 48 | ### Building the image 49 | 50 | From project root: 51 | 52 | ``` 53 | # PHPVERSION could be 8.2, 8.3 or 8.4. 54 | PHPVERSION=8.4 55 | docker build --build-arg PHPVERSION=$PHPVERSION -t quay.io/pantheon-public/build-tools-ci:9.x-php${PHPVERSION} . 56 | ``` 57 | 58 | ### Using the image 59 | 60 | #### Image name and tag 61 | 62 | - quay.io/pantheon-public/build-tools-ci:9.x-php8.2 63 | - quay.io/pantheon-public/build-tools-ci:9.x-php8.3 64 | - quay.io/pantheon-public/build-tools-ci:9.x-php8.4 65 | 66 | #### Usage example 67 | 68 | Set the right image tag in the following files and it will work as expected: 69 | 70 | - [Drupal 8 Github Actions](https://github.com/pantheon-systems/example-drops-8-composer/blob/master/.ci/.github/workflows/build_deploy_and_test.yml) 71 | - [Drupal 8 CircleCI](https://github.com/pantheon-systems/example-drops-8-composer/blob/master/.circleci/config.yml) 72 | - [Drupal 8 GitlabCI](https://github.com/pantheon-systems/example-drops-8-composer/blob/master/.gitlab-ci.yml) 73 | - [Drupal 8 Bitbucket Pipelines](https://github.com/pantheon-systems/example-drops-8-composer/blob/master/bitbucket-pipelines.yml) 74 | -------------------------------------------------------------------------------- /catalog-info.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: backstage.io/v1alpha1 3 | kind: Component 4 | metadata: 5 | name: docker-build-tools-ci 6 | description: Auto-generated catalog info for pantheon-systems/docker-build-tools-ci 7 | annotations: 8 | backstage.io/techdocs-ref: dir:docs/ 9 | spec: 10 | type: tool 11 | lifecycle: mature 12 | owner: devx 13 | -------------------------------------------------------------------------------- /patches/641.diff: -------------------------------------------------------------------------------- 1 | diff --git a/Imagick.stub.php b/Imagick.stub.php 2 | index 804c0152..49da9386 100644 3 | --- a/Imagick.stub.php 4 | +++ b/Imagick.stub.php 5 | @@ -1669,4 +1669,5 @@ public function setInterpolateMethod(int $method): bool{} 6 | public function setOrientation(int $orientation): bool {} 7 | #endif 8 | 9 | +#endif 10 | } 11 | -------------------------------------------------------------------------------- /scripts/set-environment: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | 4 | # 5 | # Before calling this script, set the following environent variables: 6 | # 7 | # - CI_BRANCH: the branch being tested 8 | # - CI_BUILD_NUMBER: monotonically increasing build counter 9 | # - PR_NUMBER: pull request number (if job is from a pull request) 10 | # 11 | # Optionally: 12 | # 13 | # - CI_PULL_REQUEST: URL to the current pull request; used to set PR_NUMBER 14 | # - DEFAULT_SITE: name of the repository; used to set TERMINUS_SITE 15 | # 16 | # Note that any environment variable given above is not set, then 17 | # it will be assigned its value from the corresponding CircleCI 18 | # environment variable. 19 | # 20 | CI_BRANCH=${CI_BRANCH:-$CIRCLE_BRANCH} 21 | CI_BUILD_NUMBER=${CI_BUILD_NUMBER:-$CIRCLE_BUILD_NUM} 22 | CI_PROJECT_NAME=${CI_PROJECT_NAME:-$CIRCLE_PROJECT_REPONAME} 23 | CI_PULL_REQUEST=${CI_PULL_REQUEST:-$CIRCLE_PULL_REQUEST} 24 | 25 | # Circle sets both $CIRCLE_PULL_REQUEST and $CI_PULL_REQUEST. 26 | PR_NUMBER=${PR_NUMBER:-$CI_PULL_REQUEST} 27 | PR_NUMBER=${PR_NUMBER##*/} 28 | 29 | # Set up BASH_ENV if it was not set for us. 30 | BASH_ENV=${BASH_ENV:-$HOME/.bashrc} 31 | 32 | # Provide a default email address 33 | GIT_EMAIL=${GIT_EMAIL:-ci-bot@pantheon.io} 34 | 35 | # We will also set the default site name to be the same as the repository name. 36 | DEFAULT_SITE=${DEFAULT_SITE:-$CI_PROJECT_NAME} 37 | 38 | # By default, we will make the main branch master. 39 | DEFAULT_BRANCH=${DEFAULT_BRANCH:-master} 40 | 41 | # If we are on the default branch. 42 | if [[ ${CI_BRANCH} == ${DEFAULT_BRANCH} ]] ; then 43 | # Use dev as the environment. 44 | DEFAULT_ENV=${DEFAULT_ENV:-dev} 45 | else 46 | # Otherwise, name the environment after the CI build number. 47 | DEFAULT_ENV=ci-$CI_BUILD_NUMBER 48 | fi 49 | 50 | # If there is a PR number provided, though, then we will use it instead. 51 | if [[ -n ${PR_NUMBER} ]] ; then 52 | DEFAULT_ENV="pr-${PR_NUMBER}" 53 | fi 54 | 55 | CI_PR_URL=${CI_PR_URL:-$CIRCLE_PULL_REQUEST} 56 | CI_PROJECT_USERNAME=${CI_PROJECT_USERNAME:-$CIRCLE_PROJECT_USERNAME} 57 | CI_PROJECT_REPONAME=${CI_PROJECT_REPONAME:-$CIRCLE_PROJECT_REPONAME} 58 | TERMINUS_SITE=${TERMINUS_SITE:-$DEFAULT_SITE} 59 | TERMINUS_ENV=${TERMINUS_ENV:-$DEFAULT_ENV} 60 | 61 | # If any Pantheon environments are locked, users may provide a URL-encoded 62 | # 'username:password' string in an environment variable to include the 63 | # HTTP Basic Authentication. 64 | MULTIDEV_SITE_BASIC_AUTH=${MULTIDEV_SITE_BASIC_AUTH:-$SITE_BASIC_AUTH} 65 | DEV_SITE_BASIC_AUTH=${DEV_SITE_BASIC_AUTH:-$SITE_BASIC_AUTH} 66 | TEST_SITE_BASIC_AUTH=${TEST_SITE_BASIC_AUTH:-$SITE_BASIC_AUTH} 67 | LIVE_SITE_BASIC_AUTH=${LIVE_SITE_BASIC_AUTH:-$SITE_BASIC_AUTH} 68 | 69 | # Prepare the Basic Authentication strings, appending the "@" sign if not empty. 70 | MULTIDEV_SITE_BASIC_AUTH=${MULTIDEV_SITE_BASIC_AUTH:+"$MULTIDEV_SITE_BASIC_AUTH@"} 71 | DEV_SITE_BASIC_AUTH=${DEV_SITE_BASIC_AUTH:+"$DEV_SITE_BASIC_AUTH@"} 72 | TEST_SITE_BASIC_AUTH=${TEST_SITE_BASIC_AUTH:+"$TEST_SITE_BASIC_AUTH@"} 73 | LIVE_SITE_BASIC_AUTH=${LIVE_SITE_BASIC_AUTH:+"$LIVE_SITE_BASIC_AUTH@"} 74 | 75 | #===================================================================================================================== 76 | # EXPORT needed environment variables 77 | # 78 | # Circle CI 2.0 does not yet expand environment variables so they have to be manually EXPORTed 79 | # Once environment variables can be expanded this section can be removed 80 | # See: https://discuss.circleci.com/t/unclear-how-to-work-with-user-variables-circleci-provided-env-variables/12810/11 81 | # See: https://discuss.circleci.com/t/environment-variable-expansion-in-working-directory/11322 82 | # See: https://discuss.circleci.com/t/circle-2-0-global-environment-variables/8681 83 | # Bitbucket has similar issues: 84 | # https://bitbucket.org/site/master/issues/18262/feature-request-pipeline-command-to-modify 85 | #===================================================================================================================== 86 | ( 87 | echo 'export PATH=$PATH:$HOME/bin' 88 | echo "export PR_NUMBER=$PR_NUMBER" 89 | echo "export CI_BRANCH=$(echo $CI_BRANCH | grep -v '"'^\(master\|[0-9]\+.x\)$'"')" 90 | echo "export CI_BUILD_NUMBER=$CI_BUILD_NUMBER" 91 | echo "export DEFAULT_SITE='$DEFAULT_SITE'" 92 | echo "export CI_PR_URL='$CI_PR_URL'" 93 | echo "export CI_PROJECT_USERNAME='$CI_PROJECT_USERNAME'" 94 | echo "export CI_PROJECT_REPONAME='$CI_PROJECT_REPONAME'" 95 | echo "export DEFAULT_ENV='$DEFAULT_ENV'" 96 | echo 'export TERMINUS_HIDE_UPDATE_MESSAGE=1' 97 | echo "export TERMINUS_SITE='$TERMINUS_SITE'" 98 | echo "export TERMINUS_ENV='$TERMINUS_ENV'" 99 | echo "export DEFAULT_BRANCH='$DEFAULT_BRANCH'" 100 | # TODO: Reconcile with environment variables set by build:project:create 101 | echo 'export BEHAT_ADMIN_PASSWORD=$(openssl rand -base64 24)' 102 | echo 'export BEHAT_ADMIN_USERNAME=pantheon-ci-testing-$CI_BUILD_NUMBER' 103 | echo 'export BEHAT_ADMIN_EMAIL=no-reply+ci-$CI_BUILD_NUMBER@getpantheon.com' 104 | echo "export MULTIDEV_SITE_URL='https://${MULTIDEV_SITE_BASIC_AUTH}$TERMINUS_ENV-$TERMINUS_SITE.pantheonsite.io/'" 105 | echo "export DEV_SITE_URL='https://${DEV_SITE_BASIC_AUTH}dev-$TERMINUS_SITE.pantheonsite.io/'" 106 | echo "export TEST_SITE_URL='https://${TEST_SITE_BASIC_AUTH}test-$TERMINUS_SITE.pantheonsite.io/'" 107 | echo "export LIVE_SITE_URL='https://${LIVE_SITE_BASIC_AUTH}live-$TERMINUS_SITE.pantheonsite.io/'" 108 | echo "export ARTIFACTS_DIR='artifacts'" 109 | echo "export ARTIFACTS_FULL_DIR='/tmp/artifacts'" 110 | ) >> $BASH_ENV 111 | 112 | # If a Terminus machine token and site name are defined 113 | if [[ -n "$TERMINUS_MACHINE_TOKEN" && -n "$TERMINUS_SITE" ]] 114 | then 115 | 116 | # Authenticate with Terminus 117 | terminus -n auth:login --machine-token="$TERMINUS_MACHINE_TOKEN" > /dev/null 2>&1 118 | 119 | # Use Terminus to fetch variables 120 | TERMINUS_SITE_UUID=$(terminus site:info $TERMINUS_SITE --field=id) 121 | 122 | # And add those variables to $BASH_ENV 123 | ( 124 | echo "export TERMINUS_SITE_UUID='$TERMINUS_SITE_UUID'" 125 | ) >> $BASH_ENV 126 | fi 127 | 128 | source $BASH_ENV 129 | 130 | echo 'Contents of BASH_ENV:' 131 | cat $BASH_ENV 132 | echo 133 | 134 | # Avoid ssh prompting when connecting to new ssh hosts 135 | mkdir -p $HOME/.ssh && echo "StrictHostKeyChecking no" >> "$HOME/.ssh/config" 136 | 137 | # Configure the GitHub Oauth token if it is available 138 | if [ -n "$GITHUB_TOKEN" ]; then 139 | composer -n config --global github-oauth.github.com $GITHUB_TOKEN 140 | fi 141 | 142 | # Set up our default git config settings if git is available. 143 | git config --global user.email "${GIT_EMAIL:-no-reply+ci-$CI_BUILD_NUMBER@getpantheon.com}" 144 | git config --global user.name "CI Bot" 145 | git config --global core.fileMode false 146 | 147 | # Re-install the Terminus Build Tools plugin if requested 148 | if [ -n $BUILD_TOOLS_VERSION ] && [ "$BUILD_TOOLS_VERSION" <> 'dev-master' ]; then 149 | echo "Install Terminus Build Tools Plugin version $BUILD_TOOLS_VERSION." 150 | echo "Note that it is NOT RECOMMENDED to define BUILD_TOOLS_VERSION, save in the Terminus Build Tools plugin tests themselves. All other tests should use the version bundled with the container." 151 | terminus self:plugin:install terminus-build-tools-plugin:$BUILD_TOOLS_VERSION 152 | fi 153 | --------------------------------------------------------------------------------