Skip to content

Commit 731d958

Browse files
committed
use gh access token in jenkinsfile
1 parent de111fb commit 731d958

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ pipeline {
5050
steps {
5151
unstash 'dll'
5252
pwsh 'git tag $Env:RELEASE_TAG'
53-
pwsh 'git push --tags'
53+
withCredentials([string(credentialsId: 'github-access-token', variable: 'GITHUB_TOKEN')]) {
54+
pwsh 'git remote add origin-access https://$Env:GITHUB_TOKEN@github.com/tutao/mapirs.git'
55+
pwsh 'git push origin-access --tags'
56+
pwsh 'git remote remove origin-access'
57+
}
5458
sleep(10)
5559
pwsh '''
5660
echo $Env:RELEASE_TAG

0 commit comments

Comments
 (0)