Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dawn-ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
dawn
dawn-ci
Commits
aee107df
Commit
aee107df
authored
3 years ago
by
Tucker Siegel
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
a68f7621
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dawn-manager/staging
+41
-0
41 additions, 0 deletions
dawn-manager/staging
vars/backendDevServicePipeline.groovy
+0
-0
0 additions, 0 deletions
vars/backendDevServicePipeline.groovy
vars/backendStagingServicePipeline copy.groovy
+37
-7
37 additions, 7 deletions
vars/backendStagingServicePipeline copy.groovy
with
78 additions
and
7 deletions
dawn-manager/staging
0 → 100644
+
41
−
0
View file @
aee107df
pipeline {
agent {label "node2"}
tools {nodejs "node"}
stages {
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/build/_admin
sudo mkdir /var/www/dawn_staging/build/_admin
sudo cp -r build/* /var/www/dawn_staging/build/_admin
'''
}
}
stage('restart nginx') {
steps {
sh '''
sudo service nginx restart
'''
}
}
}
}
This diff is collapsed.
Click to expand it.
vars/backend
Staging
ServicePipeline.groovy
→
vars/backend
Dev
ServicePipeline.groovy
+
0
−
0
View file @
aee107df
File moved
This diff is collapsed.
Click to expand it.
dawn-manager/dev-env
→
vars/backendStagingServicePipeline copy.groovy
+
37
−
7
View file @
aee107df
pipeline {
def
call
(
String
repo
,
String
branch
,
String
serviceName
)
{
agent any
pipeline
{
agent
{
label
'node2'
}
// parameters {
// string{
// name: "BRANCH_NAME",
// defaultValue: "",
// description: "Branch to use"
// }
// }
tools
{
tools
{
go
'go-1.16'
go
'go-1.16'
}
}
...
@@ -10,16 +18,24 @@ pipeline {
...
@@ -10,16 +18,24 @@ pipeline {
stage
(
'checkout'
)
{
stage
(
'checkout'
)
{
steps
{
steps
{
git branch:
"main"
,
git
branch:
branch
,
credentialsId:
'tucker-gitlab-login'
,
credentialsId:
'tucker-gitlab-login'
,
url:
"https://gitlab.cs.umd.edu/dawn/go-backend/dawn-manager.git"
url:
repo
}
}
}
}
stage
(
'test'
)
{
steps
{
sh
"""
dawn-cli test
"""
}
}
stage
(
'build'
)
{
stage
(
'build'
)
{
steps
{
steps
{
sh
"""
sh
"""
dawn-cli build-image -p .
dawn-cli build-image -p .
-e staging
"""
"""
}
}
}
}
...
@@ -27,7 +43,7 @@ pipeline {
...
@@ -27,7 +43,7 @@ pipeline {
stage
(
'update backend services'
)
{
stage
(
'update backend services'
)
{
steps
{
steps
{
sh
'''
sh
'''
curl -o docker-compose-dev.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/docker-compose-
dev
.yml/raw?ref=main"
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 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.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 prometheus.rules.yml --header "PRIVATE-TOKEN: y2FHtFXMC8X13onnEfiE" "https://gitlab.cs.umd.edu/api/v4/projects/16574/repository/files/prometheus.rules.yml/raw?ref=main"
...
@@ -38,9 +54,23 @@ pipeline {
...
@@ -38,9 +54,23 @@ pipeline {
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/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"
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
dawn-manager
"
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
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment