-
Notifications
You must be signed in to change notification settings - Fork 9
/
.probo.yaml
50 lines (50 loc) · 2.71 KB
/
.probo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
image: proboci/ubuntu-14.04-lamp:php-7.1
assets:
- probossh.tar.gz
steps:
- name: Import SSH Keys
command: 'tar -C $HOME/.ssh -zxvf $ASSET_DIR/probossh.tar.gz ; ls -al $HOME/.ssh'
- name: Build Drupal
plugin: Script
script:
- composer self-update ; composer global update
- cd /src
- composer install --ansi
- if [ $(git ls-remote --heads https://github.com/ucdavis/sitefarm_seed.git $BRANCH_NAME | wc -l) = 1 ]; then BRANCH="$BRANCH_NAME"; else BRANCH=8.x-1.x; fi
- composer require "ucdavis/sitefarm_seed:dev-$BRANCH" --ansi
- name: Drupal site setup
plugin: Drupal
drupalVersion: 8
subDirectory: web
runInstall: true
profileName: sitefarm_subprofile
installArgs: '--site-name="Testing SiteFarm Distro Template on Probo" --account-pass=probo [email protected]'
- name: Fix files directory permissions
command: 'chown -R www-data:www-data /var/www/html/sites/default/files'
- name: Run Behat NoJS
plugin: Script
script:
- cp $SRC_DIR/behat.probo.yml /var/www/html/profiles/sitefarm_seed/behat.yml
- cd /var/www/html/profiles/sitefarm_seed
- $SRC_DIR/vendor/bin/behat --profile probo --tags "~@javascript" --colors
- name: Run Behat JS
plugin: Script
script:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get -qq update
- sudo apt-get -qq install google-chrome-stable -y --force-yes > /dev/null 2>&1
- which google-chrome
- wget http://chromedriver.storage.googleapis.com/2.30/chromedriver_linux64.zip > /dev/null 2>&1
- sudo unzip chromedriver_linux64.zip -d /usr/bin
- wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar > /dev/null 2>&1
- xvfb-run java -jar selenium-server-standalone-2.53.1.jar -Dwebdriver.chrome.driver="/usr/bin/chromedriver" > /dev/null 2>&1 & sleep 5
- cd /var/www/html/profiles/sitefarm_seed
- $SRC_DIR/vendor/bin/behat --profile probo --tags "@javascript" --colors
- disown
- name: Post to Slack
plugin: Script
script: |
PR_NAME=$(echo "$PULL_REQUEST_NAME" | tr -d '"')
SLACK="PR <$PULL_REQUEST_LINK|$PR_NAME> has finished building.\n<https://app.probo.ci/#/dashboard/build/$BUILD_ID|Review> the build on Probo\n<$BUILD_DOMAIN/user|Log in> to the fully-built site (username: admin, password: probo)"
curl -X POST --data-urlencode "payload={\"username\": \"Probo.CI Bot\", \"text\": \"$SLACK\", \"icon_emoji\": \":proboci:\"}" https://hooks.slack.com/services/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