fix docker image build for master

This commit is contained in:
cpanato
2019-12-02 19:46:19 +01:00
parent 4e5004ddd2
commit 3543fcce6c

View File

@@ -115,11 +115,15 @@ pipeline {
}
}
stage ('Build Docker mattermost-enterprise-edition') {
stage ('Build Docker Images') {
agent {
label 'default-mm-builder'
}
steps {
script {
forcefullyCleanWorkspace(mmBuilderServer)
platformStages.platformCheckoutTE(env.BRANCH_NAME)
}
dir('src/github.com/mattermost/mattermost-server') {
withCredentials([usernamePassword(credentialsId: 'matterbuild-docker-hub', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
@@ -127,21 +131,7 @@ pipeline {
export TAG='${env.BRANCH_NAME}'
docker build --no-cache --build-arg MM_PACKAGE=https://releases.mattermost.com/mattermost-platform/${env.BRANCH_NAME}/mattermost-enterprise-linux-amd64.tar.gz -t mattermost/mattermost-enterprise-edition:\${TAG} build
docker push mattermost/mattermost-enterprise-edition:\${TAG}
docker logout
"""
}
}
}
}
stage ('Build Docker mattermost-team-edition') {
agent {
label 'default-mm-builder'
}
steps {
dir('src/github.com/mattermost/mattermost-server') {
withCredentials([usernamePassword(credentialsId: 'matterbuild-docker-hub', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
sh """
export TAG='${env.BRANCH_NAME}'
docker build --no-cache --build-arg MM_PACKAGE=https://releases.mattermost.com/mattermost-platform/${env.BRANCH_NAME}/mattermost-team-linux-amd64.tar.gz -t mattermost/mattermost-team-edition:\${TAG} build