ok no I think I got it fixed. Curl can't handle long parameters, e.g., a 2MB file.
All checks were successful
beefhavers/potterverse-wizards-are-morons/pipeline/head This commit looks good
All checks were successful
beefhavers/potterverse-wizards-are-morons/pipeline/head This commit looks good
This commit is contained in:
parent
010e42370f
commit
b3d11bf29d
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@ -4,7 +4,7 @@ pipeline {
|
|||||||
environment {
|
environment {
|
||||||
JENKINSONGITEA=credentials('d0e86441-2157-405f-8539-a9a9010c6ecf')
|
JENKINSONGITEA=credentials('d0e86441-2157-405f-8539-a9a9010c6ecf')
|
||||||
JENKINSONMATRIXTOKEN=credentials('17d18fd7-29eb-4957-9532-ce42aaa9b4ec')
|
JENKINSONMATRIXTOKEN=credentials('17d18fd7-29eb-4957-9532-ce42aaa9b4ec')
|
||||||
MATRIX_ROOMID="//todo"
|
MATRIX_ROOMID="!ViwVCXWvgsjFhMZlLX:greyn.club"
|
||||||
GITEA_PROJECT="https://gitea.arg.rip/beefhavers/potterverse-wizards-are-morons"
|
GITEA_PROJECT="https://gitea.arg.rip/beefhavers/potterverse-wizards-are-morons"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
@ -12,17 +12,18 @@ pipeline {
|
|||||||
when { changeset "meta/avatar.png"}
|
when { changeset "meta/avatar.png"}
|
||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
env.avatar=sh(returnStdout: true, script: "base64 meta/avatar.png");
|
|
||||||
//to gitea
|
//to gitea
|
||||||
sh(returnStdout: true, script: """
|
sh(returnStdout: true, script: """
|
||||||
|
echo "{\"image\": \"\$(base64 --wrap=0 meta/avatar.png)\"}" > post.json
|
||||||
|
|
||||||
curl -X 'POST' \
|
curl -X 'POST' \
|
||||||
'https://gitea.arg.rip/api/v1/repos/beefhavers/potterverse-wizards-are-morons/avatar' \
|
'https://gitea.arg.rip/api/v1/repos/beefhavers/potterverse-wizards-are-morons/avatar' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'Authorization: token ${env.JENKINSONGITEA}' \
|
-H 'Authorization: token ${env.JENKINSONGITEA}' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
--data-binary post.json'
|
||||||
"image": "${env.avatar}"
|
|
||||||
}'
|
rm post.json
|
||||||
""")
|
""")
|
||||||
|
|
||||||
//to matrix
|
//to matrix
|
||||||
|
Loading…
Reference in New Issue
Block a user