-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #196 from DontShaveTheYak/develop
Release v0.12.0
- Loading branch information
Showing
33 changed files
with
667 additions
and
78 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -167,3 +167,6 @@ dmypy.json | |
|
||
# profiling data | ||
.prof | ||
|
||
# Ignore Jenkins Server output | ||
nohup.out |
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
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,7 @@ | ||
# Docker | ||
This folder contains the various containers used by the Jenkins Standard Library. | ||
|
||
* [prod](./prod/) - This container is based on [jenkins/jenkins:latest-jdk11](https://hub.docker.com/r/jenkins/jenkins) and has the Jenkins Standard Library already configured. | ||
* [dev](./dev/) - Based on the [prod](./prod/) image but has additional configuration for local development using vscode dev containers. | ||
* [jfr](./jfr/) - Based on the [prod](./prod/) image but is setup as a [Jenkinsfile-Runner](https://github.com/jenkinsci/jenkinsfile-runner) to run tests. | ||
* [demo](./demo/) - Based on the [prod](./prod/) image and setup with examples of |
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,40 @@ | ||
ARG baseImage=dsty/jenkins | ||
|
||
FROM ${baseImage} | ||
|
||
ARG NONROOT_USER=jenkins | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
USER root | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
sudo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "#!/bin/sh\n\ | ||
sudoIf() { if [ \"\$(id -u)\" -ne 0 ]; then sudo \"\$@\"; else \"\$@\"; fi }\n\ | ||
SOCKET_GID=\$(stat -c '%g' /var/run/docker.sock) \n\ | ||
if [ \"${SOCKET_GID}\" != '0' ]; then\n\ | ||
if [ \"\$(cat /etc/group | grep :\${SOCKET_GID}:)\" = '' ]; then sudoIf groupadd --gid \${SOCKET_GID} docker-host; fi \n\ | ||
if [ \"\$(id ${NONROOT_USER} | grep -E \"groups=.*(=|,)\${SOCKET_GID}\(\")\" = '' ]; then sudoIf usermod -aG \${SOCKET_GID} ${NONROOT_USER}; fi\n\ | ||
fi\n\ | ||
exec \"\$@\"" > /usr/local/share/docker-init.sh \ | ||
&& chmod +x /usr/local/share/docker-init.sh \ | ||
&& echo $NONROOT_USER ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$NONROOT_USER \ | ||
&& chmod 0440 /etc/sudoers.d/$NONROOT_USER | ||
|
||
USER jenkins | ||
WORKDIR $JENKINS_HOME | ||
|
||
## Plugins | ||
RUN jenkins-plugin-cli --plugins job-dsl simple-theme-plugin ansicolor | ||
|
||
## Setup init scripts | ||
COPY docker/demo/init_scripts/* /usr/share/jenkins/ref/init.groovy.d/ | ||
COPY jobs seed-jobs | ||
|
||
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false | ||
ENV JENKINS_SLAVE_AGENT_PORT= | ||
ENV JENKINS_OPTS="--httpPort=80" | ||
ENV PATH="/$JENKINS_HOME/.local/bin:$PATH" |
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,23 @@ | ||
# DSTY demo | ||
|
||
This image was created to allow people to easily run the Jenkinst Standard Library locally. | ||
|
||
It contains the example jobs and the recommended plugins from the main [README.md](../../README.md). | ||
|
||
This image is avaliable publicly from [dsty/jenkins:demo](https://hub.docker.com/repository/docker/dsty/jenkins). | ||
|
||
## Building locally | ||
|
||
From the root of the repo run: | ||
```sh | ||
docker build -t dsty/jenkins:demo -f docker/demo/Dockerfile . | ||
``` | ||
|
||
## Using | ||
|
||
To run this container: | ||
```sh | ||
docker run -d --rm -p 4000:80 dsty/jenkins:demo | ||
``` | ||
|
||
You can then see the jenkins at [127.0.0.1:4000](http://127.0.0.1:4000). If the seed job hasn't run, you can run it manually. |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import jenkins.model.Jenkins; | ||
import org.jenkinsci.plugins.simpletheme.CssTextThemeElement; | ||
|
||
Jenkins jenkins = Jenkins.get() | ||
|
||
org.codefirst.SimpleThemeDecorator themeDecorator = jenkins.getExtensionList(org.codefirst.SimpleThemeDecorator.class).first() | ||
|
||
final String cssOverides = '''\ | ||
.pipeline-annotated { | ||
display: none; | ||
} | ||
.pipeline-new-node { | ||
display: none; | ||
} | ||
''' | ||
|
||
themeDecorator.setElements([ | ||
new CssTextThemeElement(cssOverides) | ||
]) | ||
|
||
jenkins.save() |
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.