Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
cc64e482
Commit
cc64e482
authored
5 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
SSB-47
: refactored jenkinsfile to have a successful build
parent
e2da98be
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!44
Merge back holography to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CAL/Docker/Jenkinsfile
+15
-10
15 additions, 10 deletions
CAL/Docker/Jenkinsfile
with
15 additions
and
10 deletions
CAL/Docker/Jenkinsfile
+
15
−
10
View file @
cc64e482
...
...
@@ -4,35 +4,40 @@ pipeline {
}
environment
{
LOFAR_REGISTRY_URL
=
"http://nexus.cep4.control.lofar:18080"
LOFAR_TAG
=
"${env.BUILD_NAME}-${env.BUILD_NUMBER}"
LOFAR_REGISTRY
=
"nexus.cep4.control.lofar:18080"
LOFAR_TAG
=
"${env.BRANCH_NAME}-${env.BUILD_NUMBER}"
}
stages
{
stage
(
'Build base docker file'
)
{
steps
{
script
{
with
dir
(
'CAL/Docker/HolographyBase'
){
def
image
=
docker
.
build
(
'holography-base'
)
image
.
tag
(
env
.
LOFAR_TAG
)
dir
(
'CAL/Docker/HolographyBase'
){
name
=
docker
.
build
(
"holography-base"
).
tag
(
env
.
LOFAR_TAG
)
withDockerRegistry
(
credentialsId:
'nexus'
,
url:
env
.
LOFAR_REGISTRY_URL
)
{
image
.
push
(
)
tag_and_push
(
name
,
env
.
LOFAR_REGISTRY
)
}
}
}
}
}
stage
(
'Build build docker file'
)
{
steps
{
script
{
with
dir
(
'CAL/Docker/HolographyBuild'
){
def
image
=
docker
.
build
(
'holography-build'
)
image
.
tag
(
env
.
LOFAR_TAG
)
name
=
docker
.
build
(
"holography-build"
,
'-f CAL/Docker/HolographyBuild/Dockerfile .'
)
.
tag
(
env
.
LOFAR_TAG
)
withDockerRegistry
(
credentialsId:
'nexus'
,
url:
env
.
LOFAR_REGISTRY_URL
)
{
image
.
push
()
}
tag_and_push
(
name
,
env
.
LOFAR_REGISTRY
)
}
}
}
}
}
}
def
tag_and_push
(
image_name
,
registry
){
sh
"docker tag $image_name $registry/$image_name"
sh
"docker push $registry/$image_name"
}
\ 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