Debian Codegraph @

helper/update_obs_services.sh

raw
1 #!/bin/bash
2
3 set -euo pipefail
4
5 api_target="https://api.opensuse.org/trigger/runservice"
6 api_token=$1
7
8 while read -r build_test; do
9 build_test_path=$(dirname "${build_test}")
10 dist=$(echo "${build_test_path}" | cut -f 3 -d/)
11 arch=$(echo "${build_test_path}" | cut -f 2 -d/)
12 project="Virtualization:Appliances:Images:Testing_${arch}:${dist}"
13 package=$(basename "${build_test_path}")
14 curl_target="${api_target}?project=${project}&package=${package}"
15
16 echo "Updating Test: ${package} for: ${project}"
17 curl -H "Authorization: Token ${api_token}" \
18 -X POST "${curl_target}"
19 done < <(find build-tests -name "appliance.kiwi")