Commit 67e90354 authored by 盛金强's avatar 盛金强

Add new file

parent 4a35d30d
pipeline {
agent {
node {
label 'nodejs'
}
}
environment {
KUBECONFIG_CREDENTIAL_ID = 'devops-kubeconfig'
REGISTRY = '10.0.6.228:5000'
DOCKERHUB_NAMESPACE = 'house-manage-yp'
APP_NAME = 'web-main'
NAMESPACE = 'house-manage-yp'
}
stages {
stage ('checkout scm') {
steps {
checkout(scm)
}
}
stage ('build & push') {
steps {
container ('nodejs') {
sh 'docker build -f Dockerfile --build-arg project=yangpu-sit -t $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$BUILD_NUMBER .'
sh 'docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$BUILD_NUMBER'
}
}
}
stage('deploy') {
steps {
kubernetesDeploy(configs: 'deploy/**', enableConfigSubstitution: true, kubeconfigId: "$KUBECONFIG_CREDENTIAL_ID")
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment