-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
77 lines (77 loc) · 2.83 KB
/
.gitpod.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
github:
prebuilds:
master: true
branches: false
pullRequests: true
pullRequestsFromForks: false
addCheck: false
addComment: false
addBadge: false
ports:
- port: 3306
onOpen: ignore
visibility: private
- port: 33060
onOpen: ignore
visibility: private
- port: 8001
onOpen: ignore
visibility: public
image: pookmish/drupal8ci:gitpod
checkoutLocation: soe_profile
workspaceLocation: /workspace/stack
tasks:
- before: >
rm -rf ~/.ssh/id_rsa &&
rm -rf ~/.ssh/id_rsa.pub &&
eval $(command gp env -e) &&
mkdir -p ~/.ssh &&
[[ ! -z $SSH_PUBLIC_KEY ]] &&
echo $SSH_PUBLIC_KEY | base64 -d > ~/.ssh/id_rsa.pub &&
chmod 644 ~/.ssh/id_rsa.pub &&
[[ ! -z $SSH_PRIVATE_KEY ]] &&
echo $SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_rsa &&
chmod 600 ~/.ssh/id_rsa &&
[[ ! -z $GITCONFIG ]] &&
echo $GITCONFIG | base64 -d > ~/.gitconfig &&
chmod 644 ~/.gitconfig
init: >
export PREVIEW_FULL_URL=`gp url 8001` &&
export PREVIEW_URL=${PREVIEW_FULL_URL#"https://"} &&
cd /workspace &&
git clone https://github.com/SU-SWS/acsf-cardinalsites-public.git stack &&
cd /workspace/stack &&
cd $GITPOD_REPO_ROOT &&
export PROFILE_BRANCH=`git rev-parse --abbrev-ref HEAD` &&
echo $PROFILE_BRANCH &&
cd /workspace/stack &&
composer remove su-sws/stanford_profile --no-update &&
composer require su-soe/soe_profile:"dev-$PROFILE_BRANCH || $PROFILE_BRANCH-dev" --no-update &&
composer update --no-interaction &&
rm -rf docroot/*/custom/* &&
composer install --prefer-source --no-interaction &&
rm -rf docroot/profiles/custom/soe_profile &&
ln -s $GITPOD_REPO_ROOT docroot/profiles/custom/soe_profile &&
cp .gitpod/blt.yml blt/local.blt.yml &&
mkdir -p docroot/sites/settings &&
cp .gitpod/global.settings.php docroot/sites/settings/global.settings.php &&
sed -i 's/stanford_profile/soe_profile/' docroot/sites/settings/global.settings.php &&
find docroot/sites/ -name 'local*' | xargs rm &&
blt blt:telemetry:disable --no-interaction &&
blt settings &&
drush si soe_profile -v -y &&
drush cim -y &&
ls -a | grep .git | grep -v '.gitpod*' | xargs rm -rf
command: |
export GITPOD_REPO_ROOT=/workspace/stack
apache2ctl restart
gp await-port 8001
find docroot -name 'local.drush.yml' | xargs rm &&
export PREVIEW_FULL_URL=`gp url 8001` &&
export PREVIEW_URL=${PREVIEW_FULL_URL#"https://"} &&
blt settings
drush uli
drush uli | xargs gp preview --external
git config core.fileMode false
blt blt:telemetry:disable --no-interaction
cd docroot/profiles/custom/soe_profile && git remote set-url origin [email protected]:SU-SOE/soe_profile.git && cd $GITPOD_REPO_ROOT