testing deployment
This commit is contained in:
parent
701685bb15
commit
ae46ed76a7
|
|
@ -1,11 +1,12 @@
|
|||
pipeline {
|
||||
agent { label 'ubuntu-latest' } // Runs on an Ubuntu-based Jenkins agent
|
||||
agent any // Runs on an Ubuntu-based Jenkins agent
|
||||
|
||||
environment {
|
||||
REGISTRY_URL = 'git.winteraccess.id'
|
||||
IMAGE_NAME = 'winter-access/backend_nam'
|
||||
KUBE_CONFIG_ID = '8c2082d8-ab78-48b5-a27b-6717387a5ce6'
|
||||
KUBE_CONFIG_ID = '1c8bd8d9-1590-468c-afc7-24495d4330dc'
|
||||
CREDENTIALS_ID = '8242519c-ed9e-447a-ad63-1f8d7368cf68'
|
||||
DOCKERUSRPASS = '08063d26-0005-4942-9b87-9d819a13b973'
|
||||
}
|
||||
|
||||
stages {
|
||||
|
|
@ -26,13 +27,14 @@ pipeline {
|
|||
stage('Login to Registry') {
|
||||
steps {
|
||||
script {
|
||||
sh """
|
||||
echo '${env.REGISTRY_TOKEN}' | docker login ${REGISTRY_URL} --username ${env.REGISTRY_USER} --password-stdin
|
||||
"""
|
||||
withCredentials([usernamePassword(credentialsId: "${DOCKERUSRPASS}", usernameVariable: 'REGISTRY_USER', passwordVariable: 'REGISTRY_TOKEN')]) {
|
||||
sh """
|
||||
echo '${REGISTRY_TOKEN}' | docker login ${REGISTRY_URL} --username ${REGISTRY_USER} --password-stdin
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build and Push Docker Image') {
|
||||
steps {
|
||||
script {
|
||||
|
|
|
|||
Loading…
Reference in New Issue