From b3d11bf29d720e4f237f064cce1502c1bc95b627 Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 26 Apr 2025 11:54:23 -0400 Subject: [PATCH] ok no I think I got it fixed. Curl can't handle long parameters, e.g., a 2MB file. --- Jenkinsfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac8374d..1bec92c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { environment { JENKINSONGITEA=credentials('d0e86441-2157-405f-8539-a9a9010c6ecf') 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" } stages { @@ -12,17 +12,18 @@ pipeline { when { changeset "meta/avatar.png"} steps { script{ - env.avatar=sh(returnStdout: true, script: "base64 meta/avatar.png"); //to gitea sh(returnStdout: true, script: """ - curl -X 'POST' \ - 'https://gitea.arg.rip/api/v1/repos/beefhavers/potterverse-wizards-are-morons/avatar' \ - -H 'accept: application/json' \ - -H 'Authorization: token ${env.JENKINSONGITEA}' \ - -H 'Content-Type: application/json' \ - -d '{ - "image": "${env.avatar}" - }' + echo "{\"image\": \"\$(base64 --wrap=0 meta/avatar.png)\"}" > post.json + + curl -X 'POST' \ + 'https://gitea.arg.rip/api/v1/repos/beefhavers/potterverse-wizards-are-morons/avatar' \ + -H 'accept: application/json' \ + -H 'Authorization: token ${env.JENKINSONGITEA}' \ + -H 'Content-Type: application/json' \ + --data-binary post.json' + + rm post.json """) //to matrix