forked from hailo-ai/tappas
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbitbucket-pipelines.yml
33 lines (33 loc) · 1.23 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
pipelines:
branches:
develop:
- step:
script:
- export USER_NAME=$(git show -s --format="%an <%ae>" $BITBUCKET_COMMIT)
- echo $USER_NAME
- MERGE_MESSAGE=`git log --format=%B -n 1 $BITBUCKET_COMMIT`
- MERGE_MESSAGE="${MERGE_MESSAGE//\"/\'}"
- echo $MERGE_MESSAGE
- if [[ $MERGE_MESSAGE == *"[NO_UPDATE_REV]"* ]]; then
- echo "The string [NO_UPDATE_REV] is present."
- exit 0
- fi
- pipe: atlassian/trigger-pipeline:5.1.0
variables:
BITBUCKET_ACCESS_TOKEN: $HAILO_YOCTO_VALIDATION_TOKEN
REPOSITORY: 'hailo-yocto-validation'
REF_NAME: 'develop'
CUSTOM_PIPELINE_NAME: 'update_media_library_revisions_pipeline'
PIPELINE_VARIABLES: >
[{
"key": "USERNAME",
"value": "$USER_NAME"
},
{
"key": "MERGE_MESSAGE",
"value": "$MERGE_MESSAGE"
},
{
"key": "TRIGGER_REPO",
"value": "$BITBUCKET_REPO_FULL_NAME"
}]