This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse/xtext#1533] Provide Jenkins job to build xtext-web Docker Image
Signed-off-by: Nico Prediger <mail@nicoprediger.de>
- Loading branch information
1 parent
be4d782
commit 72b33f9
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
pipeline { | ||
agent { | ||
label "external" | ||
} | ||
|
||
options { | ||
buildDiscarder(logRotator(numToKeepStr:'25')) | ||
disableConcurrentBuilds() | ||
timeout(time: 15, unit: 'MINUTES') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage('Copy WAR') { | ||
steps { | ||
script { | ||
step ([$class: 'CopyArtifact', | ||
projectName: 'xtext-web/master', | ||
filter: "build/maven-repository/org/eclipse/xtext/org.eclipse.xtext.web.example.jetty/*/org.eclipse.xtext.web.example.jetty-*.war", | ||
target: 'releng/docker/xtext-web-deploy/xtext-web', | ||
flatten: true | ||
]); | ||
} | ||
sh "ls -lah releng/docker/xtext-web-deploy/xtext-web" | ||
} | ||
} | ||
|
||
stage('Build Docker') { | ||
steps { | ||
dir("releng/docker/xtext-web-deploy/xtext-web") { | ||
sh """ | ||
docker build --no-cache -t xtext/xtext-web:latest . | ||
docker push xtext/xtext-web:latest | ||
""" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM jetty:jre8 | ||
|
||
COPY --chown=999:999 org.eclipse.xtext.web.example.jetty-*.war /var/lib/jetty/webapps/ROOT.war |