From 1838cbb56e37179d4e8ff34d10a2eee6bfca4989 Mon Sep 17 00:00:00 2001 From: Voomra Date: Mon, 18 Aug 2025 14:22:07 +0300 Subject: [PATCH] build(ci): fix set http headers --- .jenkinsfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.jenkinsfile b/.jenkinsfile index 836e879..1aa06d7 100644 --- a/.jenkinsfile +++ b/.jenkinsfile @@ -35,9 +35,11 @@ pipeline { def responseApi = httpRequest( url: env.GITEA_API_URL, httpMode: 'POST', - acceptType: 'application/json', - contentType: 'application/json', - customHeaders: [[name: 'Authorization', value: "token ${env.GITEA_TOKEN}"]], + customHeaders: [ + [name: 'Accept-Type', value: 'application/json'], + [name: 'Content-Type', value: 'application/json'], + [name: 'Authorization', value: 'token ' + env.GITEA_TOKEN], + ], requestBody: releaseData) def responseCode = responseApi.status @@ -78,7 +80,11 @@ pipeline { httpMode: 'POST', acceptType: 'application/json', contentType: 'application/octet-stream', - customHeaders: [[name: 'Authorization', value: "token ${env.GITEA_TOKEN}"]], + customHeaders: [ + [name: 'Accept-Type', value: 'application/json'], + [name: 'Content-Type', value: 'application/octet-stream'], + [name: 'Authorization', value: 'token ' + env.GITEA_TOKEN] + ], uploadFile: "build/libs/${fileName}") def responseCode = responseApi.status