[DEV] add basic jenkinsfile
This commit is contained in:
parent
6ae615a870
commit
810b7a9b72
30
.jenkinsfile
Normal file
30
.jenkinsfile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
REGISTRY_ADDRESS = "gitea.atria-soft.org"
|
||||||
|
REGISTRY_ADDRESS_FULL = "https://${REGISTRY_ADDRESS}"
|
||||||
|
REPOSITORY_BASE_NAME = 'jatria-soft/etk'
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def getEnvName(branchName) {
|
||||||
|
if("master".equals(branchName)) {
|
||||||
|
return "latest";
|
||||||
|
} else if("dev".equals(branchName)) {
|
||||||
|
return "dev";
|
||||||
|
}
|
||||||
|
return "other";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user