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() } } } }