This commit is contained in:
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -3,6 +3,9 @@ pipeline {
|
||||
agent { dockerfile true }
|
||||
|
||||
stages {
|
||||
environment {
|
||||
REGISTRY_CREDENTIALS = credentials('registry-credentials-id')
|
||||
}
|
||||
stage('Installation') {
|
||||
steps {
|
||||
echo "start Installation"
|
||||
@@ -13,7 +16,7 @@ pipeline {
|
||||
steps {
|
||||
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}"
|
||||
echo 'Building..'
|
||||
sh 'docker build -t registry.proxyq.co/cd/website .'
|
||||
sh 'docker build -t registry.proxyq.co/jenkins/website:${env.BUILD_ID} .'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
@@ -26,11 +29,9 @@ pipeline {
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
echo "${env.ENV_REGISTRY_URL}"
|
||||
// docker.withRegistry("https://registry.proxyq.co", 'registry-credentials-id') {
|
||||
// def customImage = docker.build("registry.proxyq.co/jenkins/website:${env.BUILD_ID}", '.')
|
||||
// customImage.push()
|
||||
// }
|
||||
}
|
||||
sh 'docker login https://registry.proxyq.co -u ${REGISTRY_CREDENTIALS_USR} -p ${REGISTRY_CREDENTIALS_PSW}'
|
||||
sh 'docker push registry.proxyq.co/jenkins/website:${env.BUILD_ID}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user