From 25fa3f8298361c003d60dc2da8c52669ca8c5079 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sun, 8 Jan 2023 17:49:20 +0100 Subject: [PATCH] [DEV] add basic jenkinsfile --- .jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .jenkinsfile diff --git a/.jenkinsfile b/.jenkinsfile new file mode 100644 index 0000000..831c1c0 --- /dev/null +++ b/.jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + environment { + REGISTRY_ADDRESS = "gitea.atria-soft.org" + REGISTRY_ADDRESS_FULL = "https://${REGISTRY_ADDRESS}" + REPOSITORY_BASE_NAME = 'kangaroo-and-rabbit/archidata' + TAG_DOCKER = getEnvName(env.BRANCH_NAME) + } + stages { + stage('save-evironment') { + steps { + sh 'ls -la' + sh 'pwd' + sh 'uname -a' + sh 'printenv | sort' + //sh 'cat version.txt' + sh 'git log -n 20' + sh 'javac --version' + } + } + } +} + +def getEnvName(branchName) { + if("master".equals(branchName)) { + return "latest"; + } else if("dev".equals(branchName)) { + return "dev"; + } + return "other"; +} \ No newline at end of file