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

u

parent 13376889
No related branches found
No related tags found
No related merge requests found
pipeline {
agent { label 'node3' }
tools { nodejs 'node' }
stages {
stage('notify') {
steps {
script {
slack_send_start()
}
}
}
stage('ensure cli') {
steps {
sh '''
npm install -g gatsby-cli@4.24.0
gatsby -v
'''
}
}
stage('build') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
git branch: 'main',
credentialsId: 'tgsiegel-gitlab-ssh',
url: 'git@gitlab.cs.umd.edu:dawn/dawn-docs.git'
sh '''
npm i
gatsby clean
npm run build:internal
'''
}
}
stage('copy build') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
sh '''
sudo rm -rf /var/www/dawn_docs/public
sudo cp -r public /var/www/dawn_docs
'''
}
}
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: 'tgsiegel-gitlab-ssh',
url: 'git@gitlab.cs.umd.edu:dawn/dawn-docs.git'
sh '''
npm i
npm run build
'''
}
}
stage('copy build') {
steps {
sh '''
sudo rm -rf /var/www/dawn_docs/public
sudo cp -r public /var/www/dawn_docs
'''
}
}
stage('restart nginx') {
steps {
sh '''
sudo service nginx restart
'''
}
}
}
post {
success {
script {
slack_send_success()
}
}
failure {
script {
slack_send_failure()
}
}
}
}
pipeline { pipeline {
agent { label 'node3' } agent { label 'node2' }
tools { nodejs 'node' } tools { nodejs 'node' }
stages { stages {
stage('notify') { stage('notify') {
...@@ -9,48 +9,19 @@ pipeline { ...@@ -9,48 +9,19 @@ pipeline {
} }
} }
} }
stage('ensure cli') {
steps {
sh '''
npm install -g gatsby-cli@4.24.0
gatsby -v
'''
}
}
stage('build') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
git branch: 'main',
credentialsId: 'tgsiegel-gitlab-ssh',
url: 'git@gitlab.cs.umd.edu:dawn/dawn-docs.git'
sh '''
npm i
gatsby clean
npm run build:internal
'''
}
}
stage('copy build') { stage('build') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps { steps {
sh ''' sh '''
sudo rm -rf /var/www/dawn_docs/public sudo docker build -t docker.registry.dawn.int:5000/dawn/dawn-docs:latest . -f Dockerfile
sudo cp -r public /var/www/dawn_docs sudo docker push docker.registry.dawn.int:5000/dawn/dawn-docs:latest
''' '''
} }
} }
stage('restart nginx') { stage('deploy') {
steps { steps {
sh ''' upgradeKubernetes('dawn-docs', 'dev')
sudo service nginx restart
'''
} }
} }
} }
......
...@@ -12,31 +12,20 @@ pipeline { ...@@ -12,31 +12,20 @@ pipeline {
stage('build') { stage('build') {
steps { steps {
git branch: 'main', git branch: 'staging',
credentialsId: 'tgsiegel-gitlab-ssh', credentialsId: 'tgsiegel-gitlab-ssh',
url: 'git@gitlab.cs.umd.edu:dawn/dawn-docs.git' url: 'git@gitlab.cs.umd.edu:dawn/go-backend/dawn-docs.git'
sh ''' sh '''
npm i sudo docker build -t docker.registry.dawn.int:5000/dawn/dawn-docs:latest . -f Dockerfile
npm run build sudo docker push docker.registry.dawn.int:5000/dawn/dawn-docs:latest
''' '''
} }
} }
stage('copy build') { stage('deploy') {
steps { steps {
sh ''' upgradeKubernetes('dawn-analytics', 'docs')
sudo rm -rf /var/www/dawn_docs/public
sudo cp -r public /var/www/dawn_docs
'''
}
}
stage('restart nginx') {
steps {
sh '''
sudo service nginx restart
'''
} }
} }
} }
......
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