Variables pour le contexte de production

This commit is contained in:
Benjamin Bohard 2022-08-11 11:06:32 +02:00
parent 5dee07ce46
commit 71a94bb201
2 changed files with 6 additions and 7 deletions

View File

@ -20,17 +20,17 @@ def call() {
string(
name: 'targetUrl',
description: 'URL cible pour le dépôt de fichier',
defaultValue: 'http://nextcloud.cadoles.com'
defaultValue: 'https://nextcloud.cadoles.com'
)
string(
name: 'targetFolder',
description: 'Répertoire racine cible partagé avec lutilisateur',
defaultValue: 'documents_formations'
defaultValue: 'Cadoles Formations'
)
string(
name: 'credentialsId',
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 projectName = env.project_name
def destFolder = "${projectName}/${docProfile}"
def result = tamarin.compileDoc()
def result = tamarin.compileDoc(env.buildProfile)
println(result)
if(docProfile != 'draft') {
def publicFolder = "${destFolder}/latest/public"

View File

@ -91,7 +91,7 @@ def buildPackage(
}
def compileDoc(
String packageProfile = "doc-compiler",
String buildProfile,
String destDir = "./packages",
Boolean forceRebuild = false
) {
@ -107,8 +107,7 @@ def compileDoc(
def dockerArgs = """
-u 0
-v /var/run/docker.sock:/var/run/docker.sock
${forceRebuild ? '-e TAMARIN_FORCE_REBUILD=1' : ''}
${packageProfile ? '-e TAMARIN_PROFILE='+packageProfile : ''}
-e TAMARIN_PROFILE=${buildProfile}
-e TAMARIN_DEST_DIR=${destDir}
""".stripIndent()