From 71a94bb20149a4001bd72ca982ae56cef00b0577 Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Thu, 11 Aug 2022 11:06:32 +0200 Subject: [PATCH] Variables pour le contexte de production --- vars/compileDoc.groovy | 8 ++++---- vars/tamarin.groovy | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/vars/compileDoc.groovy b/vars/compileDoc.groovy index 0938d96..010bc8e 100644 --- a/vars/compileDoc.groovy +++ b/vars/compileDoc.groovy @@ -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 l’utilisateur', - 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" diff --git a/vars/tamarin.groovy b/vars/tamarin.groovy index 5d35fc8..0afa7e4 100644 --- a/vars/tamarin.groovy +++ b/vars/tamarin.groovy @@ -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()