build(ci): fix set http headers
This commit is contained in:
14
.jenkinsfile
14
.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
|
||||
|
||||
Reference in New Issue
Block a user