Skip to content
Snippets Groups Projects
Commit e7635601 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

update manager

parent 9753d7ec
No related branches found
No related tags found
No related merge requests found
pipeline {
agent { label 'node2' }
tools { nodejs 'node' }
stages {
stage('notify') {
steps {
script {
slack_send_start()
}
}
}
stage('build') {
steps {
git branch: 'main',
credentialsId: 'tucker-gitlab-login',
url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-manager.git'
sh '''
npm i
npm run build-staging
'''
}
}
stage('copy build') {
steps {
sh '''
sudo rm -rf /var/www/dawn_staging/_admin
sudo mkdir /var/www/dawn_staging/_admin
sudo cp -r build/* /var/www/dawn_staging/_admin
'''
}
}
stage('restart nginx') {
steps {
sh '''
sudo service nginx restart
'''
}
}
}
post {
success {
script {
slack_send_success()
}
}
failure {
script {
slack_send_failure()
}
}
}
}
pipeline {
agent { label 'node2' }
tools { nodejs 'node' }
stages {
stage('notify') {
steps {
script {
slack_send_start()
}
}
}
stage('build') {
steps {
git branch: 'main',
credentialsId: 'tucker-gitlab-login',
url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-manager.git'
sh '''
sudo docker build -t docker.registry.dawn.int:5000/dawn/dawn-manager:latest . -f Dockerfile
sudo docker push docker.registry.dawn.int:5000/dawn/dawn-manager:latest
'''
}
}
stage('deploy') {
steps {
dir('/home/kube/staging') {
sh 'git pull'
sh 'kubectl delete -f dawn-manager'
sh 'kubectl apply -f dawn-manager'
}
}
}
}
post {
success {
script {
slack_send_success()
}
}
failure {
script {
slack_send_failure()
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment