pipeline { agent any environment { IMG_NAME = 'firmtracker-server' DOCKER_REPO = 'maciejm0101/firmtracker' } stages { stage('build') { steps { script { sh 'docker build -t ${IMG_NAME} .' sh 'docker tag ${IMG_NAME} ${DOCKER_REPO}:${IMG_NAME}' } } } stage('push') { steps { script { sh 'echo 'Makaron118912' | docker login -u "maciejm.01@interia.pl" --password-stdin' sh 'docker push ${DOCKER_REPO}:${IMG_NAME}' } } } } }