diff --git a/Jenkinsfile b/Jenkinsfile index bcc7594..7dcd00e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,14 +23,14 @@ THE SOFTWARE. node { sh 'git rev-parse --verify HEAD > GIT_COMMIT' - sh 'cat GIT_COMMIT' - git_commit = readFile('GIT_COMMIT').trim().substring(0, 10) - env.GIT_COMMIT = git_commit + env.GIT_COMMIT = readFile('GIT_COMMIT').trim().substring(0, 10) sh 'rm GIT_COMMIT' + def jobName = env.JOB_NAME.tokenize('/') + print env.jobName env.NODEJS_HOME = "${tool 'node14'}" env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}" - env.DOCKER_NAME="web/wannistesvorbei:${env.BRANCH_NAME}-${env.GIT_COMMIT}" + env.DOCKER_NAME="${jobName[0]}/${jobName[1]}:${env.BRANCH_NAME}-${env.GIT_COMMIT}" def customImage @@ -65,7 +65,7 @@ node { stage('Deploy'){ echo 'Push to Repo' - docker.withRegistry('https://docker.sebse.de', 'docker-registry-robot') { + docker.withRegistry('https://docker.sebse.de', 'docker-registry-robot-web-development') { /* Push the container to the custom Registry */ customImage.push()