Code owners
Assign users and groups as approvers for specific file changes. Learn more.
dev 2.59 KiB
pipeline {
agent {
node {
label "node3"
customWorkspace '/dawn-gdd'
}
}
tools {
go 'go-1.16'
}
stages {
stage('test') {
steps {
sh """
dawn-cli test
"""
}
}
stage('build') {
steps {
sh """
dawn-cli build-image -p . -e staging
"""
}
}
stage('update backend services') {
steps {
sh '''
curl -o docker-compose-dev.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/docker-compose-staging.yml/raw?ref=main"
curl -o shared-compose.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/shread-compose.yml/raw?ref=main"
curl -o prometheus.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/prometheus.yml/raw?ref=main"
curl -o prometheus.rules.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/prometheus.rules.yml/raw?ref=main"
curl -o rabbitmq.conf --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/rabbitmq.conf/raw?ref=main"
mkdir elk_config || true
curl -o logstash-compose.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/logstash-compose.conf/raw?ref=main"
curl -o elk_config/elasticsearch.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/elk_config%2Felasticsearch.yml/raw?ref=main"
curl -o elk_config/filebeat.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/elk_config%2Ffilebeat.yml/raw?ref=main"
'''
sh "dawn-cli update -s ${serviceName} -e staging"
}
}
stage('cleanup') {
steps {
sh '''
docker rmi $(docker images | grep "dawn/.*-test" | awk '{print $3}') --force || true
'''
}
}
}
post {
always {
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/coverage.xml', enableNewApi: true, failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 40, 60', maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}
}