-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwercker.yml
28 lines (28 loc) · 1000 Bytes
/
wercker.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
box: php:5-apache
build:
steps:
- install-packages:
packages: php-pear
- script:
name: pear install,
code: |
pear channel-discover pear.nrk.io
pear install nrk/Predis
- script:
name: move artifacts to /var/www/html
code: mv guestbook.php controllers.js index.html /var/www/html
- script:
name: remove other files to slim down container
code: rm -rf $WERCKER_SOURCE_DIR/*
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
repository: $DOCKER_REPO
tag: latest # alternatively you can do $WERCKER_GIT_BRANCH or just leave it empty
ports: 80
cmd: apache2-foreground
after-steps:
- script:
name: pull image on remote Deis PaaS
code: |
curl -H "Authorization: Token $DEIS_TOKEN" -H "Content-Type: application/json" -X POST http://$DEIS_CONTROLLER/v2/apps/gb/builds -d '{"image": "'"$DOCKER_REPO"'"}'