[DO-1670] add msg files to test env (!96)
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/96 Reviewed-by: Vasiliy Chipizhin <vasiliy.chipizhin@avroid.team> Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
@@ -7,7 +7,7 @@ pipelineJob('Cloud/Deploy/Backend/msg-files-deploy') {
|
|||||||
parameters {
|
parameters {
|
||||||
choice {
|
choice {
|
||||||
name('ENV')
|
name('ENV')
|
||||||
choices(['DEV'])
|
choices(['DEV', 'TEST'])
|
||||||
description('Select one of environments')
|
description('Select one of environments')
|
||||||
}
|
}
|
||||||
choiceParameter {
|
choiceParameter {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ slaveTemplates.jnlp {
|
|||||||
|
|
||||||
if (env.TAG_NAME) {
|
if (env.TAG_NAME) {
|
||||||
print "Upload from tag ${env.TAG_NAME}"
|
print "Upload from tag ${env.TAG_NAME}"
|
||||||
|
currentBuild.description = env.TAG_NAME
|
||||||
|
|
||||||
dir(localArtifactDir){
|
dir(localArtifactDir){
|
||||||
String artifacts = sh(
|
String artifacts = sh(
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ slaveTemplates.jnlp {
|
|||||||
Map props = readTOML file: projectSettingFile
|
Map props = readTOML file: projectSettingFile
|
||||||
|
|
||||||
String version = props.tool.poetry.version
|
String version = props.tool.poetry.version
|
||||||
|
|
||||||
tag = "${version}-${gitVars.GIT_COMMIT.take(5)}"
|
tag = "${version}-${gitVars.GIT_COMMIT.take(5)}"
|
||||||
|
currentBuild.description = tag
|
||||||
|
|
||||||
String imageName = "${env.JENKINS_DOCKER_REGISTRY}/" +
|
String imageName = "${env.JENKINS_DOCKER_REGISTRY}/" +
|
||||||
"${dockerGroup}/${dockerProject}:${tag}"
|
"${dockerGroup}/${dockerProject}:${tag}"
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ slaveTemplates.jnlp {
|
|||||||
stage('build and push image'){
|
stage('build and push image'){
|
||||||
appVersion = readJSON(file: 'package.json').version
|
appVersion = readJSON(file: 'package.json').version
|
||||||
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
||||||
|
currentBuild.description = imageTag
|
||||||
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
||||||
|
|
||||||
Object buildImage = docker.build(
|
Object buildImage = docker.build(
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ slaveTemplates.jnlp {
|
|||||||
stage('build and push image'){
|
stage('build and push image'){
|
||||||
appVersion = readJSON(file: 'package.json').version
|
appVersion = readJSON(file: 'package.json').version
|
||||||
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
||||||
|
currentBuild.description = imageTag
|
||||||
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
||||||
|
|
||||||
Object buildImage = docker.build(
|
Object buildImage = docker.build(
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ slaveTemplates.jnlp {
|
|||||||
stage('build and push image'){
|
stage('build and push image'){
|
||||||
appVersion = readJSON(file: 'package.json').version
|
appVersion = readJSON(file: 'package.json').version
|
||||||
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
imageTag = "${appVersion}-${gitVars.GIT_COMMIT.take(5)}"
|
||||||
|
currentBuild.description = imageTag
|
||||||
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
docker.withRegistry("https://${env.JENKINS_DOCKER_REGISTRY}", env.JENKINS_HARBOR_CREDENTIALS) {
|
||||||
|
|
||||||
Object buildImage = docker.build(
|
Object buildImage = docker.build(
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ String repositoryName = 'msg-files' // Replace with your Harbor repository name
|
|||||||
String k8sAppName = repositoryName
|
String k8sAppName = repositoryName
|
||||||
Map envBranch = [
|
Map envBranch = [
|
||||||
'DEV': 'develop',
|
'DEV': 'develop',
|
||||||
// 'TEST': 'test'
|
'TEST': 'test'
|
||||||
]
|
]
|
||||||
|
|
||||||
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
||||||
@@ -105,6 +105,7 @@ slaveTemplates.jnlp {
|
|||||||
--install ${k8sAppName} ${helmRepoPath} \
|
--install ${k8sAppName} ${helmRepoPath} \
|
||||||
--wait
|
--wait
|
||||||
"""
|
"""
|
||||||
|
currentBuild.description = "ENV: ${params.ENV} TAG: ${env.APP_VERSION}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ slaveTemplates.jnlp {
|
|||||||
--install ${k8sAppName} ${helmRepoPath} \
|
--install ${k8sAppName} ${helmRepoPath} \
|
||||||
--wait
|
--wait
|
||||||
"""
|
"""
|
||||||
|
currentBuild.description = "ENV: ${params.ENV} TAG: ${env.APP_VERSION}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user