Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
D
docker-demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Saliou
docker-demo
Commits
8b694ab5
Commit
8b694ab5
authored
Mar 24, 2022
by
Saliou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build images
parent
f8205aa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
Jenkinsfile
Jenkinsfile
+8
-18
No files found.
Jenkinsfile
View file @
8b694ab5
...
...
@@ -15,40 +15,30 @@ pipeline {
echo
'Building..'
}
}
stage
(
'Test'
)
{
steps
{
echo
'Testing..'
}
}
stage
(
'Build
and push
image'
)
{
stage
(
'Build image'
)
{
steps
{
script
{
echo
'Build..'
def
version
=
readFile
(
'VERSION'
)
def
versions
=
version
.
split
(
'\\.'
)
def
major
=
versions
[
0
]
def
minor
=
versions
[
0
]
+
'.'
+
versions
[
1
]
def
patch
=
version
.
trim
()
docker
.
withRegistry
(
''
,
'dockerhub'
)
{
def
image
=
docker
.
build
(
'baamtu/docker-demo:master'
,
' -f ./Dockerfile .'
)
image
.
push
()
}
sh
"docker build -t baamtu/docker-demo:master ."
}
}
}
stage
(
'Cleaning up'
)
{
steps
{
stage
(
'Push image'
)
{
steps
{
sh
"docker push baamtu/docker-demo:master"
sh
"yes | docker system prune -a"
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment