Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
demo-infra-jenkins-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
demo
demo-infra-jenkins-agent
Commits
980a4373
Commit
980a4373
authored
Apr 25, 2020
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pipeline.
parent
ff090ba2
Pipeline
#5
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
36 deletions
+17
-36
Jenkinsfile
Jenkinsfile
+17
-36
No files found.
Jenkinsfile
View file @
980a4373
pipeline
{
node
{
label
'docker'
def
customImage
agent
{
node
{
label
'docker'
}
}
options
{
timeout
(
time:
1
,
unit:
'HOURS'
)
buildDiscarder
(
logRotator
(
numToKeepStr:
'10'
,
artifactNumToKeepStr:
'3'
)
)
ansiColor
(
'xterm'
)
stage
(
'Clone repository'
)
{
checkout
scm
}
triggers
{
c
ron
(
'@weekly'
)
stage
(
'Build Docker image'
)
{
c
ustomImage
=
docker
.
build
(
"demo-infra-jenkins-agent"
)
}
stages
{
stage
(
'Clone repository'
)
{
checkout
scm
}
stage
(
'Build Docker image'
)
{
customImage
=
docker
.
build
(
"demo-infra-jenkins-agent"
)
stage
(
'Test Docker image'
)
{
app
.
inside
{
sh
'mvn'
}
stage
(
'Test Docker image'
)
{
app
.
inside
{
sh
'mvn'
}
}
stage
(
'Push image'
)
{
/* push image with two tags:
* - the incremental build number from Jenkins;
* - the 'latest' tag. */
docker
.
withRegistry
(
'https://www.joaolino.com/nexus/repository/docker-public/'
,
'nexus-admin'
)
{
customImage
.
push
(
"${env.BUILD_NUMBER}"
)
customImage
.
push
(
"latest"
)
}
}
stage
(
'Push image'
)
{
/* push image with two tags:
* - the incremental build number from Jenkins;
* - the 'latest' tag. */
docker
.
withRegistry
(
'https://www.joaolino.com/nexus/repository/docker-public/'
,
'nexus-admin'
)
{
customImage
.
push
(
"${env.BUILD_NUMBER}"
)
customImage
.
push
(
"latest"
)
}
}
}
\ No newline at end of file
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