forked from nextflow-io/nextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrigger_ci_builds.sh
executable file
·46 lines (38 loc) · 1.03 KB
/
trigger_ci_builds.sh
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
#!/bin/bash
#
# See
# https://docs.travis-ci.com/user/triggering-builds/
#
set -e
set -u
set -o pipefail
NXF_VER=${1:-}
function trigger_build() {
local PROJECT=$1
local BRANCH=${2:-master}
echo "Triggering Travis build ${PROJECT} [${BRANCH}] -- Nextflow ${NXF_VER:-latest}"
local body='{ "request": { "branch":"master" '
if [[ $NXF_VER ]]; then
body+=', "config":{ "env": {"NXF_VER":"'$NXF_VER'"}} '
fi
body+='}}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_TOKEN" \
-d "$body" \
https://api.travis-ci.org/repo/$(echo -n $PROJECT | sed 's@/@%2F@g')/requests
sleep 1
}
trigger_build nextflow-io/tests
trigger_build nextflow-io/examples
trigger_build nextflow-io/hello
trigger_build nextflow-io/rnatoy
trigger_build nextflow-io/rnaseq-nf
trigger_build cbcrg/piper-nf
trigger_build cbcrg/kallisto-nf
trigger_build cbcrg/mta-nf
trigger_build cbcrg/ampa-nf
trigger_build cbcrg/shootstrap
trigger_build CRG-CNAG/CalliNGS-NF