-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
36 lines (31 loc) · 1.79 KB
/
bitbucket-pipelines.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
# Template C++ Application
# This template allows you to validate your C++ application.
# The workflow allows running tests and code linting on the default branch.
image:
name: plath/mercurydpm@sha256:df370f5f1dfb1e7117977eb5fd7a8ae1ff550230a079c1491fb8b49194590dba
# only pull requests to master
# - if [ "${BITBUCKET_PR_DESTINATION_BRANCH}" != "master" ]; then printf 'not #a target branch we want to check'; exit; fi
pipelines:
default:
- step:
name: Test
script:
- export BITBUCKET_TRIGGERER_USERNAME=$(curl -X GET -g "https://api.bitbucket.org/2.0/users/${BITBUCKET_STEP_TRIGGERER_UUID}" | tac | tac | jq --raw-output '.display_name')
- pipe: atlassian/slack-notify:2.2.0
variables:
WEBHOOK_URL: 'https://hooks.slack.com/services/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'
MESSAGE: "Checking commit [${BITBUCKET_COMMIT}] of User $BITBUCKET_TRIGGERER_USERNAME \n make fullTest running for $BITBUCKET_REPO_SLUG/$BITBUCKET_BRANCH"
- mkdir MercuryBuild
- cd MercuryBuild
- cmake -DMercuryDPM_USE_MPI=OFF -DCMAKE_BUILD_TYPE=Debug -DMercuryDPM_BUILD_USER_DIR=ON -DMercuryDPM_BUILD_DOCUMENTATION=ON -G 'Unix Makefiles' ../
- make fullTest
artifacts:
- Drivers/SelfTests/*.errorlog
- Drivers/UnitTests/*.errorlog
after-script:
- if [ $BITBUCKET_EXIT_CODE != 0 ] ; then BUILD_STATUS="FAILED" ; fi
- pipe: atlassian/slack-notify:2.2.0
variables:
WEBHOOK_URL: 'https://hooks.slack.com/services/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'
MESSAGE: '"Build has exited with status [$BUILD_STATUS];"'
DEBUG: 'true'