summaryrefslogtreecommitdiff
path: root/bin/debci-trigger-experimental
blob: c7a60860267d25d9a12bdf9f4dd8e9922f871887 (plain)
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
#!/bin/sh

# run the autopkgtest for the version of the package in experimental,
# which is not otherwise triggered.  Note that results will appear
# under unstable, e.g. at
# https://ci.debian.net/packages/m/magit-annex/unstable/amd64/

# Create ~/local/auth/debci first by visiting
# https://sso.debian.org/debian/certs/enroll_csr/ and following instructions
# to get .key and .crt, then to get the API key for ~/local/auth/debci,
# $ curl -X POST --key ~/local/auth/debiansso/spwhitton@debian.org.key --cert \
#     ~/local/auth/debiansso/spwhitton@debian.org.crt https://ci.debian.net/api/v1/getkey
# Based on Ian Jackson's stuff in dgit-junk.git

source="$1"

if [ "$source" = "" ]; then
    echo >&2 "need source package name"
    exit 1
fi

cd ~/tmp
cat >debci-trigger-experimental.json <<EOF
[
   {
      "package" : "$source",
      "trigger" : "spwhitton_experimental",
      "pin-packages" : [
         [
            "src:$source",
            "experimental"
         ]
      ]
   }
]
EOF

curl --header "Auth-Key: $(cat ~/local/auth/debci)" \
     --form tests=@debci-trigger-experimental.json \
     https://ci.debian.net/api/v1/test/unstable/amd64

rm -f debci-trigger-experimental.json