Configurer nom et adresse de l’utilisateur pour les interactions avec les dépôts git
This commit is contained in:
parent
bf7e3cf9b9
commit
8f33a8a4c9
@ -1,6 +1,8 @@
|
||||
// Pipeline de construction des images Docker des services Zéphir
|
||||
def call() {
|
||||
def buildTag
|
||||
def gitEmail = params.gitEmail ? params.gitEmail : 'jenkins@cadoles.com'
|
||||
def gitUsername = params.gitUsername ? params.gitUsername : 'Jenkins'
|
||||
|
||||
pipeline {
|
||||
|
||||
@ -106,6 +108,9 @@ def call() {
|
||||
def projectName = env.project_name
|
||||
def destFolder = "${projectName}/${docProfile}"
|
||||
def result = tamarin.compileDoc(env.buildProfile)
|
||||
if(result.size() == 0) {
|
||||
error('No artefact produced')
|
||||
}
|
||||
println(result)
|
||||
if(docProfile != 'draft') {
|
||||
def publicFolder = "${destFolder}/latest/public"
|
||||
@ -160,6 +165,10 @@ def call() {
|
||||
sh(script: "chmod +x ./sshForJenkins.sh")
|
||||
if (docProfile != 'draft') {
|
||||
withEnv(["GIT_SSH=./sshForJenkins.sh"]) {
|
||||
// Add git username/email
|
||||
sh("git config user.email '${gitEmail}'")
|
||||
sh("git config user.username '${gitUsername}'")
|
||||
|
||||
sh """
|
||||
git tag -am "paquet" release/v${dateTag}
|
||||
"""
|
||||
@ -169,6 +178,10 @@ def call() {
|
||||
}
|
||||
}
|
||||
withEnv(["GIT_SSH=./sshForJenkins.sh"]) {
|
||||
// Add git username/email
|
||||
sh("git config user.email '${gitEmail}'")
|
||||
sh("git config user.username '${gitUsername}'")
|
||||
|
||||
sh """
|
||||
git tag -d ${env.ref}
|
||||
git push origin :${env.ref}
|
||||
|
Loading…
Reference in New Issue
Block a user