Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IA2
GMS
Commits
3c0681e1
Commit
3c0681e1
authored
3 years ago
by
Sonia Zorba
Browse files
Options
Downloads
Patches
Plain Diff
Updated CI
parent
73d3182b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1835
passed
3 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+57
-11
57 additions, 11 deletions
.gitlab-ci.yml
with
57 additions
and
11 deletions
.gitlab-ci.yml
+
57
−
11
View file @
3c0681e1
...
...
@@ -3,10 +3,18 @@ stages:
-
test
-
deploy
build_gms_client
:
stage
:
build
.gms_client
:
tags
:
-
docker
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
-
changes
:
-
gms-client/gms-client/*
build_gms_client
:
extends
:
.gms_client
stage
:
build
script
:
-
cd gms-client/gms-client
-
mvn clean package -DskipTests -DfinalName=gms-client
...
...
@@ -15,28 +23,66 @@ build_gms_client:
-
gms-client/gms-client/target/gms-client.jar
-
gms-client/gms-client/pom.xml
expire_in
:
7 days
only
:
-
master
test_gms_client
:
extends
:
.gms_client
stage
:
test
script
:
-
cd gms-client/gms-client
-
mvn clean test
test_gms
:
stage
:
test
tags
:
-
docker
image
:
git.ia2.inaf.it:5050/ia2/ia2-devops/maven-otj-pg-embedded
script
:
-
cd gms
-client/gms-client
-
cd gms
-
mvn clean test
only
:
-
master
-
awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print "coverage=" 100*covered/instructions }' target/site/jacoco/jacoco.csv
coverage
:
'
/coverage=\d+\.\d+/'
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
-
changes
:
-
gms/*
deploy_gms_client
:
extends
:
.gms_client
stage
:
deploy
tags
:
-
docker
script
:
-
mvn deploy:deploy-file
-Dfile=gms-client/gms-client/target/gms-client.jar
-DrepositoryId=ia2.snapshots
-DpomFile=gms-client/gms-client/pom.xml
-Durl=${IA2_MVN_REPO_SNAPSHOTS}
only
:
-
master
dockerize_db
:
stage
:
deploy
tags
:
-
shell
script
:
-
docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
-
docker build -t "${CI_REGISTRY_IMAGE}/database" -f database/Dockerfile .
-
docker push "${CI_REGISTRY_IMAGE}/database"
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
-
changes
:
-
database/*
-
gms/src/main/resources/sql/*
dockerize_gms
:
stage
:
deploy
tags
:
-
shell
script
:
-
docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
-
docker build -t "${CI_REGISTRY_IMAGE}" -f gms/Dockerfile .
-
docker push "${CI_REGISTRY_IMAGE}"
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
"master"'
when
:
never
-
changes
:
-
gms/*
-
gms-ui/*
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