Edouard DUPIN
874b4df7a6
Some checks failed
WEB karideo and rabbit/archidata/pipeline/head There was a failure building this commit
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
pipeline {
|
|
//agent any
|
|
agent {
|
|
docker {
|
|
image 'gitea.atria-soft.org/kangaroo-and-rabbit/archlinux-builder:latest'
|
|
//args '-u root'
|
|
}
|
|
}
|
|
options {
|
|
timeout(time: 30, unit: 'MINUTES')
|
|
disableConcurrentBuilds abortPrevious: true
|
|
}
|
|
triggers {
|
|
cron(env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'dev' ? '0 10 * * *' : '')
|
|
}
|
|
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'
|
|
}
|
|
}
|
|
stage('(prod) Build') {
|
|
steps {
|
|
sh 'mvn install'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
def getEnvName(branchName) {
|
|
if("master".equals(branchName)) {
|
|
return "latest";
|
|
} else if("dev".equals(branchName)) {
|
|
return "dev";
|
|
}
|
|
return "other";
|
|
} |