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( 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 lutilisateur', description: 'Répertoire racine cible partagé avec lutilisateur',
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"

View File

@ -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()