-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from librecores/librecores-facelift
Update the LCCI Docker image to the new packaging flow
- Loading branch information
Showing
19 changed files
with
571 additions
and
611 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,25 @@ | ||
tmp/ | ||
target/ | ||
.build | ||
Dockerfile | ||
build_cache | ||
|
||
# Intellij IDEA | ||
.idea | ||
*.iml | ||
|
||
# Visual Studio Code | ||
.vscode | ||
.build | ||
.settings | ||
.project | ||
.classpath | ||
.factorypath | ||
licenses.xml | ||
|
||
# Maven code | ||
target | ||
init_scripts/target | ||
|
||
# Custom WAR Packager | ||
tmp |
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 |
---|---|---|
@@ -1 +1,21 @@ | ||
secrets | ||
|
||
# Intellij IDEA | ||
.idea | ||
*.iml | ||
|
||
# Visual Studio Code | ||
.vscode | ||
.build | ||
.settings | ||
.project | ||
.classpath | ||
.factorypath | ||
licenses.xml | ||
|
||
# Maven code | ||
target | ||
init_scripts/target | ||
|
||
# Custom WAR Packager | ||
tmp |
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 |
---|---|---|
@@ -1,12 +1,29 @@ | ||
# Contributing | ||
|
||
This page is under construction. | ||
Everyone is welcome to contribute to this repository. | ||
|
||
## Prerequisites | ||
|
||
* Make | ||
* Docker should be installed on the build machine | ||
* Linux or Windows Subsystem for Linux are recommended for building the images | ||
* If you use Windows, see [this page](https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly) for Docker configuration on WSL | ||
|
||
## Building and running the developer image | ||
|
||
See the makefile in the repository root. | ||
The image can be built with the `make build` command and then launched with `make run`. | ||
Repository buld logic | ||
|
||
If you are developing Pipeline libraries or Jenkinsfiles for LibreCores CI, | ||
use the `make dev` command. | ||
|
||
## Proposing changes | ||
|
||
0. Create pull requests against the master branch | ||
0. System configurations for Jenkins will be promoted to production manually after the merge | ||
1. Create pull requests against the master branch | ||
2. System configurations for Jenkins will be promoted to production manually after the merge | ||
|
||
## Troubleshooting | ||
|
||
In the case of any questions, please use the <code>#librecores</code> IRC chat on Freenode or create an issue in this project. | ||
In the case of any questions, please use the [librecores/librecores-ci](https://gitter.im/librecores/librecores-ci) gitter chat | ||
or create an issue in this project. |
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
FROM jenkins/jenkins:2.138.2 | ||
# | ||
# Builds the LibreCores CI Server Docker image. | ||
# | ||
FROM librecores/librecores-ci-mvn-cache as mvncache | ||
|
||
FROM jenkins/custom-war-packager:pr-104 as builder | ||
COPY --from=mvncache /mavenrepo /mavenrepo | ||
ADD . /lcci-src | ||
WORKDIR /lcci-src | ||
ENV MAVEN_OPTS=-Dmaven.repo.local=/mavenrepo | ||
RUN java -jar /app/custom-war-packager-cli.jar -configPath packager-config.yml | ||
|
||
FROM jenkins/jenkins:2.176.1 | ||
MAINTAINER Oleg Nenashev <[email protected]> | ||
LABEL Description="Spins up the local development environment" Vendor="Oleg Nenashev" Version="0.1" | ||
|
||
#TODO: Get rid of the experimental UC once the FileSystem SCM plugin is released | ||
# Use experimental UC for FileSystem SCM | ||
# See https://github.com/jenkinsci/docker/issues/538 | ||
ENV JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental | ||
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt | ||
COPY install-plugins-2.sh /usr/local/bin/install-plugins-2.sh | ||
RUN /usr/local/bin/install-plugins-2.sh < /usr/share/jenkins/ref/plugins.txt | ||
LABEL Description="Spins up the local development environment" Vendor="FOSSi" Version="0.1" | ||
COPY --from=builder /lcci-src/tmp/output/target/librecores-ci-1.0-SNAPSHOT.war /usr/share/jenkins/jenkins.war | ||
|
||
COPY init_scripts/src/main/groovy/ /usr/share/jenkins/ref/init.groovy.d/ | ||
COPY userContent ${JENKINS_HOME}/userContent/ | ||
|
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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
LCCI_IMAGE="librecores/librecores-ci:dev" | ||
CURRENT_HOST?=127.0.0.1 | ||
|
||
build: | ||
docker build -t ${LCCI_IMAGE} . | ||
|
||
run: | ||
docker run --rm -v maven-repo:/root/.m2 \ | ||
-e DEV_HOST=${CURRENT_HOST} \ | ||
-p 8080:8080 -p 50000:50000 ${LCCI_IMAGE} | ||
|
||
dev: | ||
docker run --rm -v maven-repo:/root/.m2 \ | ||
-v ${MY_PIPELINE_LIBRARY_DIR}:/var/jenkins_home/pipeline-library \ | ||
-v ${MY_OTHER_PIPELINE_LIBS_DIRS}:/var/jenkins_home/pipeline-libs \ | ||
-e DEV_HOST=${CURRENT_HOST} \ | ||
-p 8080:8080 -p 50000:50000 ${LCCI_IMAGE} | ||
|
||
debug: | ||
docker run --rm -e DEBUG=true -p 5005:5005 -v maven-repo:/root/.m2 \ | ||
-v ${MY_PIPELINE_LIBRARY_DIR}:/var/jenkins_home/pipeline-library \ | ||
-v ${MY_OTHER_PIPELINE_LIBS_DIRS}:/var/jenkins_home/pipeline-libs \ | ||
-e DEV_HOST=${CURRENT_HOST} \ | ||
-p 8080:8080 -p 50000:50000 ${LCCI_IMAGE} | ||
|
||
build-local-war: | ||
mvn clean package -Plocal-build | ||
|
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,10 @@ | ||
# | ||
# Contains build Cache definition for the LibreCores CI Server project. | ||
# TODO: add a DockerHub link. librecores/librecores-ci-mvn-cache | ||
# | ||
FROM maven:3.6.0 as mvncache | ||
ARG LCCI_BUILD_CACHE_TAG=4b415786a0dd62559c87ade781242a9f91758185 | ||
ENV MAVEN_OPTS=-Dmaven.repo.local=/mavenrepo | ||
WORKDIR /src | ||
RUN git clone https://github.com/librecores/librecores-ci-jenkins-server.git . && git checkout ${LCCI_BUILD_CACHE_TAG} | ||
RUN mvn compile dependency:resolve dependency:resolve-plugins |
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,4 @@ | ||
IMAGE_TAG="librecores/librecores-ci-mvn-cache" | ||
|
||
build: | ||
docker build -t ${IMAGE_TAG} . |
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,6 @@ | ||
Maven Cache image for LibreCores CI | ||
=================================== | ||
|
||
This base image speeds up builds of all LibreCores CI components which require Maven cache. | ||
|
||
Image location: https://cloud.docker.com/u/librecores/repository/docker/librecores/librecores-ci-mvn-cache |
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
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
Oops, something went wrong.