From ea3f7f63d0720215dc1f1d73aa1905e30b99862c Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Mon, 19 Jun 2023 13:58:25 +0200 Subject: [PATCH] feat(jenkins): adding new default jenkins configuration --- Jenkinsfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..5a3f027 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,26 @@ +// Intégration de la librairie Cadoles (voir https://forge.cadoles.com/Cadoles/Jenkins) +@Library("cadoles") _ + +// Utilisation du pipeline partagé pour les applications Symfony de Cadoles +// Le nom de l'image Docker passée en paramètre vous permet de préciser l'environnement de test +// de votre application Symfony +symfonyAppPipeline('ubuntu:22.04', [ + 'hooks': [ + // Run docker image build, verification and publication stages + 'postSymfonyAppPipeline': { + stage('Build and publish hydra-dispatcher image') { + // Retrieve current tag + String currentTag = sh(script: 'git tag --points-at HEAD | head -n 1', returnStdout: true).trim() + // Retrieve default tag + String defaultTag = sh(returnStdout: true, script: 'git describe --always').trim() + container.buildAndPublishImage([ + 'imageName': 'reg.cadoles.com/pcaseiro/hydra-sql', + // Use current tag or default tag if not defined + 'imageTag': defaultTag, + 'dockerfile': './misc/images/hydra-sql-standalone/Dockerfile', + 'dryRun': false + ]) + } + } + ] +]) \ No newline at end of file