Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jenkins-learning-project
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
Nasir Hussain
jenkins-learning-project
Commits
29e1ef33
Unverified
Commit
29e1ef33
authored
Feb 02, 2021
by
nasirhm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "
🔧
👷
"
This reverts commit
23afb98b
.
parent
23afb98b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Jenkinsfile
Jenkinsfile
+3
-11
No files found.
Jenkinsfile
View file @
29e1ef33
...
@@ -7,17 +7,9 @@ pipeline {
...
@@ -7,17 +7,9 @@ pipeline {
sh
'docker tag my-application my-application:$BUILD_NUMBER'
sh
'docker tag my-application my-application:$BUILD_NUMBER'
}
}
}
}
stage
(
'Check for an Existing Container Running'
){
steps
{
if
(
sh
(
docker
ps
|
grep
my
-
application
)){
sh
'docker kill my-application'
sh
'docker rm my-application'
}
}
}
stage
(
'Run Docker Container on Jenkins Agent'
)
{
stage
(
'Run Docker Container on Jenkins Agent'
)
{
steps
{
steps
{
sh
'docker run -d -
-name my-application -
p 80:80 my-application'
sh
'docker run -d -p 80:80 my-application'
}
}
}
}
}
}
...
...
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