BuildID: 2261
Status: OK
Image: melezhik/sparrow:alpine
Worker status: OK
---
Date: 21.12.2022 @ 01:30
Time elapsed: 92 sec
---
SCM:
https://github.com/melezhik/sparrowci-bugzilla.git
Git sha: 2bfa605
Git comment: close!
secrets:
- BUGZILLA_RESTAPI_KEY
tasks:
-
name: main
default: true
language: Raku
config:
bugid: 1632727
init: |
run_task "comment";
run_task "close" if config()<tasks><git-commit><state><comment> ~~ /'close!'/;
subtasks:
-
name: comment
language: Bash
code: |
set -e
bugid=$(config bugid)
cat << HERE > data.json
{
"comment" : "This comment is made by SparrowCI",
"is_private" : false
}
HERE
curl -f -H "Content-Type: application/json" -X POST \
--data @data.json \
https://bugzilla-dev.allizom.org/rest/bug/$bugid/comment?api_key=$BUGZILLA_RESTAPI_KEY
echo "comment has been added to https://bugzilla-dev.allizom.org/show_bug.cgi?id=$bugid"
-
name: close
language: Bash
code: |
set -e
bugid=$(config bugid)
cat << "HERE" > data.json
{
"ids" : [$bugid],
"status" : "RESOLVED",
"resolution" : "MOVED"
}
HERE
cat data.json
curl -D - -H "Content-Type: application/json" -X PUT \
--data @data.json \
https://bugzilla-dev.allizom.org/rest/bug/$bugid?api_key=$BUGZILLA_RESTAPI_KEY
echo "bug has been closed https://bugzilla-dev.allizom.org/show_bug.cgi?id=$bugid"
depends:
-
name: git-commit
- name: git-commit
plugin: git-commit-data
config:
dir: source
[35m01:30:12[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
source directory does not yet exist, download source archive from storage
[35m01:30:17[0m :: [repository] - installing pack-unpack, version 0.000001
[1;36m[task run: task.bash - unpack source archive][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2]
[3] file=$(config file)
[4] dir=$(config dir)
[5]
[6] echo "tar -xzf $file "
[7]
[8] tar -xzf $file
[9]
[10] if test $dir; then
[11] ls -l $dir
[12] fi
[13]
[14]
[1;36m[task stdout][0m
[35m01:30:20[0m :: tar -xzf source.tar.gz
[1;36m[task run: task.bash - tasks/main][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] bugid=$(config bugid)
[3] cat << HERE > data.json
[4] {
[5] "comment" : "This comment is made by SparrowCI",
[6] "is_private" : false
[7] }
[8] HERE
[9]
[10] curl -f -H "Content-Type: application/json" -X POST \
[11] --data @data.json \
[12] https://bugzilla-dev.allizom.org/rest/bug/$bugid/comment?api_key=$BUGZILLA_RESTAPI_KEY
[13]
[14] echo "comment has been added to https://bugzilla-dev.allizom.org/show_bug.cgi?id=$bugid"
[15]
[1;36m[task stdout][0m
[35m01:30:45[0m :: {"id":2304}comment has been added to https://bugzilla-dev.allizom.org/show_bug.cgi?id=1632727
[1;36m[task stderr][0m
[35m01:30:45[0m :: % Total % Received % Xferd Average Speed Time Time Time Current
[35m01:30:45[0m :: Dload Upload Total Spent Left Speed
[35m01:30:45[0m ::
[35m01:30:45[0m :: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[35m01:30:45[0m :: 100 91 0 11 100 80 20 149 --:--:-- --:--:-- --:--:-- 169
[35m01:30:45[0m :: 100 91 0 11 100 80 20 149 --:--:-- --:--:-- --:--:-- 169
[1;36m[task run: task.bash - tasks/main][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] bugid=$(config bugid)
[3] cat << "HERE" > data.json
[4] {
[5] "ids" : [$bugid],
[6] "status" : "RESOLVED",
[7] "resolution" : "MOVED"
[8] }
[9] HERE
[10]
[11] cat data.json
[12]
[13] curl -D - -H "Content-Type: application/json" -X PUT \
[14] --data @data.json \
[15] https://bugzilla-dev.allizom.org/rest/bug/$bugid?api_key=$BUGZILLA_RESTAPI_KEY
[16]
[17] echo "bug has been closed https://bugzilla-dev.allizom.org/show_bug.cgi?id=$bugid"
[18]
[1;36m[task stdout][0m
[35m01:30:45[0m :: {
[35m01:30:45[0m :: "ids" : [$bugid],
[35m01:30:45[0m :: "status" : "RESOLVED",
[35m01:30:45[0m :: "resolution" : "MOVED"
[35m01:30:45[0m :: }
[35m01:30:45[0m :: HTTP/2 400
[35m01:30:45[0m :: server: nginx
[35m01:30:45[0m :: date: Wed, 21 Dec 2022 01:30:45 GMT
[35m01:30:45[0m :: content-type: application/json; charset=UTF-8
[35m01:30:45[0m :: access-control-allow-headers: accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-api-key, x-phabricator-token, x-bugzilla-token, x-bugzilla-login, x-bugzilla-password
[35m01:30:45[0m :: access-control-allow-origin: *
[35m01:30:45[0m :: content-security-policy-report-only: default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-mQ82MIECpoITDUwLpjWRDizE6urCDeGtPSMsN7CRaRqc8NPF' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login https://phabricator-dev.allizom.org/
[35m01:30:45[0m :: etag: Ayc4greBfTKqNetnwutSYA
[35m01:30:45[0m :: referrer-policy: same-origin
[35m01:30:45[0m :: set-cookie: Bugzilla_login_request_cookie=jRfzHGsZPIS8; path=/; secure; HttpOnly; SameSite=Lax
[35m01:30:45[0m :: set-cookie: github_token=Qfu9n5KjIZ9t7eYKbPxuogmpW27Yu6oJhcdhbldMulxR41iUm6p4etmlFM61K9Roy8uWzDet3dItq60UaJ5HYIGhN18647BWQ5bFIQoGQA1XO2UcchxBngdZj52q08wWuQ7c62fFQTADj5RfcMBmusydtQtAeWmwrlr4M5VgJ9xz4dHGzS3a1FaFeL6IJ0l3XHO7R6zMQbHFexhcojGpSlbqfU4scrPdF2ma9YPBJ8rXxwkx989KPiF3gWNVJiqA; path=/; secure; HttpOnly; SameSite=Lax
[35m01:30:45[0m :: status: 400
[35m01:30:45[0m :: strict-transport-security: max-age=31536000; includeSubDomains
[35m01:30:45[0m :: strict-transport-security: max-age=31536000
[35m01:30:45[0m :: x-content-type-options: nosniff
[35m01:30:45[0m :: x-frame-options: SAMEORIGIN
[35m01:30:45[0m :: x-xss-protection: 1; mode=block
[35m01:30:45[0m :: via: 1.1 google
[35m01:30:45[0m :: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
[35m01:30:45[0m ::
[35m01:30:45[0m :: {"message":"Could not parse the 'params' argument as valid JSON. Error: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 12 (before \"$bugid], \"status\" :...\") at /app/Bugzilla/WebService/Server/REST.pm line 362. Value:","error":true,"code":32000,"documentation":"http://www.bugzilla.org/docs/4.2/en/html/api/"}bug has been closed https://bugzilla-dev.allizom.org/show_bug.cgi?id=1632727
[1;36m[task stderr][0m
[35m01:30:45[0m :: % Total % Received % Xferd Average Speed Time Time Time Current
[35m01:30:45[0m :: Dload Upload Total Spent Left Speed
[35m01:30:45[0m ::
[35m01:30:45[0m :: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[35m01:30:45[0m :: 100 438 0 359 100 79 2487 547 --:--:-- --:--:-- --:--:-- 3041
[35m01:30:29[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[35m01:30:32[0m :: [repository] - installing git-commit-data, version 0.000004
[1;36m[task run: task.bash - git-commit][0m
[1;36m[dump code: task.bash][0m
[1] cd $(config dir)
[2]
[3] echo "get commit data from $(pwd) ..."
[4]
[5] git show -s --format=%h > $cache_root_dir/sha.txt
[6] git show -s --format=%s > $cache_root_dir/comment.txt
[7]
[1;36m[task stdout][0m
[35m01:30:36[0m :: get commit data from /var/.sparrowdo/env/main/.sparrowdo/source ...
[1;36m[task run: task.pl6 - git-commit][0m
[1;36m[dump code: task.pl6][0m
[1] say "git commit: ", "{cache_root_dir()}/sha.txt".IO.slurp.chomp;
[2] say "git comment: ", "{cache_root_dir()}/comment.txt".IO.slurp.chomp;
[3]
[4]
[5] update_state({
[6] sha => "{cache_root_dir()}/sha.txt".IO.slurp.chomp,
[7] comment => "{cache_root_dir()}/comment.txt".IO.slurp.chomp
[8] });
[9]
[1;36m[task stdout][0m
[35m01:30:37[0m :: git commit: 2bfa605
[35m01:30:37[0m :: git comment: close!