build(ci): fix set http headers
This commit is contained in:
14
.jenkinsfile
14
.jenkinsfile
@@ -35,9 +35,11 @@ pipeline {
|
|||||||
def responseApi = httpRequest(
|
def responseApi = httpRequest(
|
||||||
url: env.GITEA_API_URL,
|
url: env.GITEA_API_URL,
|
||||||
httpMode: 'POST',
|
httpMode: 'POST',
|
||||||
acceptType: 'application/json',
|
customHeaders: [
|
||||||
contentType: 'application/json',
|
[name: 'Accept-Type', value: 'application/json'],
|
||||||
customHeaders: [[name: 'Authorization', value: "token ${env.GITEA_TOKEN}"]],
|
[name: 'Content-Type', value: 'application/json'],
|
||||||
|
[name: 'Authorization', value: 'token ' + env.GITEA_TOKEN],
|
||||||
|
],
|
||||||
requestBody: releaseData)
|
requestBody: releaseData)
|
||||||
|
|
||||||
def responseCode = responseApi.status
|
def responseCode = responseApi.status
|
||||||
@@ -78,7 +80,11 @@ pipeline {
|
|||||||
httpMode: 'POST',
|
httpMode: 'POST',
|
||||||
acceptType: 'application/json',
|
acceptType: 'application/json',
|
||||||
contentType: 'application/octet-stream',
|
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}")
|
uploadFile: "build/libs/${fileName}")
|
||||||
|
|
||||||
def responseCode = responseApi.status
|
def responseCode = responseApi.status
|
||||||
|
|||||||
Reference in New Issue
Block a user