/
wercker.yml
52 lines (48 loc) · 1.81 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This references the default Ruby container from
# the Docker Hub.
# https://registry.hub.docker.com/_/ruby/
# If you want to use a specific version you would use a tag:
box: pvbteam/prison-visits-public:ruby-2.4.1
no-response-timeout: 30
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
dev:
steps:
- bundle-install:
jobs: 4
- internal/shell:
code: |
Xvfb :99 -screen 0 1280x1024x24 &
export DISPLAY=:99
cd /pipeline/source
build:
steps:
- bundle-install:
jobs: 4
- script:
name: rake
code: |
Xvfb :99 -screen 0 1280x1024x24
export DISPLAY=:99
bin/rake
- internal/docker-push:
username: $USERNAME
password: $PASSWORD
tag: $WERCKER_GIT_BRANCH-$WERCKER_BUILD_ID,latest
repository: pvbteam/prison-visits-public
working-dir: $WERCKER_SOURCE_DIR
after-steps:
- script:
name: Trigger Integration Tests
code: |
if [[ $WERCKER_RESULT == "passed" ]]; then
INTEGRATION_TEST_BRANCH=wercker-integration-tests
curl "https://app.wercker.com/api/v3/runs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WERCKER_API_TOKEN" \
-X POST \
-d "{\"pipelineId\": \"598c71f0962b2c0100f778e1\", \"branch\": \"$INTEGRATION_TEST_BRANCH\", \"envVars\": [{\"key\": \"TARGET_GIT_REPOSITORY\", \"value\": \"$WERCKER_GIT_REPOSITORY\"}, {\"key\": \"TARGET_GIT_REPOSITORY_COMMIT\", \"value\": \"$WERCKER_GIT_COMMIT\"}]}"
fi