Variables pour le contexte de production
This commit is contained in:
parent
5dee07ce46
commit
71a94bb201
|
@ -20,17 +20,17 @@ def call() {
|
||||||
string(
|
string(
|
||||||
name: 'targetUrl',
|
name: 'targetUrl',
|
||||||
description: 'URL cible pour le dépôt de fichier',
|
description: 'URL cible pour le dépôt de fichier',
|
||||||
defaultValue: 'http://nextcloud.cadoles.com'
|
defaultValue: 'https://nextcloud.cadoles.com'
|
||||||
)
|
)
|
||||||
string(
|
string(
|
||||||
name: 'targetFolder',
|
name: 'targetFolder',
|
||||||
description: 'Répertoire racine cible partagé avec l’utilisateur',
|
description: 'Répertoire racine cible partagé avec l’utilisateur',
|
||||||
defaultValue: 'documents_formations'
|
defaultValue: 'Cadoles Formations'
|
||||||
)
|
)
|
||||||
string(
|
string(
|
||||||
name: 'credentialsId',
|
name: 'credentialsId',
|
||||||
description: "Identifiant du compte de type login/mot de passe",
|
description: "Identifiant du compte de type login/mot de passe",
|
||||||
defaultValue: 'jenkins-on-nextcloud'
|
defaultValue: 'nextcloud-user-for-formation-documents'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ def call() {
|
||||||
def rootFolder = "${params.targetUrl}/remote.php/dav/files/${NEXTCLOUD_USER}/${targetFolder}"
|
def rootFolder = "${params.targetUrl}/remote.php/dav/files/${NEXTCLOUD_USER}/${targetFolder}"
|
||||||
def projectName = env.project_name
|
def projectName = env.project_name
|
||||||
def destFolder = "${projectName}/${docProfile}"
|
def destFolder = "${projectName}/${docProfile}"
|
||||||
def result = tamarin.compileDoc()
|
def result = tamarin.compileDoc(env.buildProfile)
|
||||||
println(result)
|
println(result)
|
||||||
if(docProfile != 'draft') {
|
if(docProfile != 'draft') {
|
||||||
def publicFolder = "${destFolder}/latest/public"
|
def publicFolder = "${destFolder}/latest/public"
|
||||||
|
|
|
@ -91,7 +91,7 @@ def buildPackage(
|
||||||
}
|
}
|
||||||
|
|
||||||
def compileDoc(
|
def compileDoc(
|
||||||
String packageProfile = "doc-compiler",
|
String buildProfile,
|
||||||
String destDir = "./packages",
|
String destDir = "./packages",
|
||||||
Boolean forceRebuild = false
|
Boolean forceRebuild = false
|
||||||
) {
|
) {
|
||||||
|
@ -107,8 +107,7 @@ def compileDoc(
|
||||||
def dockerArgs = """
|
def dockerArgs = """
|
||||||
-u 0
|
-u 0
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock
|
-v /var/run/docker.sock:/var/run/docker.sock
|
||||||
${forceRebuild ? '-e TAMARIN_FORCE_REBUILD=1' : ''}
|
-e TAMARIN_PROFILE=${buildProfile}
|
||||||
${packageProfile ? '-e TAMARIN_PROFILE='+packageProfile : ''}
|
|
||||||
-e TAMARIN_DEST_DIR=${destDir}
|
-e TAMARIN_DEST_DIR=${destDir}
|
||||||
""".stripIndent()
|
""".stripIndent()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue