forked from nextflow-io/nextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
trigger_circleci_build.sh
executable file
·55 lines (42 loc) · 1.2 KB
/
trigger_circleci_build.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
47
48
49
50
51
52
#!/bin/bash
#
# See
# https://circleci.com/docs/nightly-builds/
#
set -e
set -u
set -o pipefail
NXF_VER=${1:-}
function trigger_build() {
local PROJECT=$1
local BRANCH=${2:-master}
echo "Triggering CircleCI build ${PROJECT} [${BRANCH}] -- Nextflow ${NXF_VER:-latest}"
local trigger_build_url=https://circleci.com/api/v1/project/${PROJECT}/tree/${BRANCH}?circle-token=${CIRCLE_TOKEN}
local params=''
[[ $NXF_VER ]] && params+="\"NXF_VER\": \"$NXF_VER\","
params+="\"RUN_NIGHTLY_BUILD\": \"true\","
params+="\"FUNCTIONAL_TEST_TARGET\": \"staging-dawn-435.herokuapp.com\""
local post_data=$(cat <<EOF
{
"build_parameters": { $params }
}
EOF)
curl \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "${post_data}" \
--request POST ${trigger_build_url}
sleep 1
}
trigger_build nextflow-io/tests
trigger_build nextflow-io/hello
trigger_build nextflow-io/rnatoy
trigger_build nextflow-io/examples
trigger_build cbcrg/piper-nf
trigger_build cbcrg/kallisto-nf
trigger_build cbcrg/lncRNA-Annotation-nf
trigger_build cbcrg/mta-nf
trigger_build cbcrg/ampa-nf
trigger_build cbcrg/shootstrap
trigger_build CRG-CNAG/CalliNGS-NF
#trigger_build cbcrg/grape-nf -- NO TESTS