Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions jenkins-slave/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM fedora:25

RUN dnf update -y \
&& dnf install -y java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless \
&& dnf install -y nano bzip2 unzip zip iproute wget \
&& dnf install -y docker \
&& dnf install -y nodejs git \
&& dnf install -y openssh openssh-server \
&& dnf --nogpgcheck install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm \
&& wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo \
&& dnf install -y yarn \
&& npm install -g phantomjs-prebuilt \
&& npm install -g bower \
&& /usr/libexec/openssh/sshd-keygen rsa \
&& /usr/libexec/openssh/sshd-keygen ecdsa \
&& /usr/libexec/openssh/sshd-keygen ed25519 \
&& groupadd --gid 995 jenkins \
&& groupadd --gid 1004 docker \
&& adduser jenkins --home-dir /var/lib/jenkins --gid 995 --uid 997 \
&& usermod -G docker -a jenkins \
&& mkdir /var/lib/jenkins/.docker \
&& mkdir /var/lib/jenkins/.ssh/ \
&& mkdir /var/lib/jenkins/.m2 \
&& mkdir /root/.ssh

COPY config.json /var/lib/jenkins/.docker
COPY settings.xml /var/lib/jenkins/.m2/settings.xml
COPY id_rsa.pub /var/lib/jenkins/.ssh/authorized_keys
COPY id_rsa.pub /root/.ssh/authorized_keys

RUN chown -R jenkins:jenkins /var/lib/jenkins/.docker \
&& chmod 0600 /var/lib/jenkins/.ssh/authorized_keys \
&& chown jenkins:jenkins /var/lib/jenkins/.ssh/authorized_keys \
&& chmod 0600 /root/.ssh/authorized_keys \
&& chown -R jenkins:jenkins /var/lib/jenkins/.m2
6 changes: 6 additions & 0 deletions jenkins-slave/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
cp ~/.ssh/id_rsa.pub .
cp ~/.docker/config.json .
docker build --force-rm --tag wonka-windup/jenkins-slave .


80 changes: 80 additions & 0 deletions jenkins-slave/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<mirrors>
<mirror>
<id>artifactorycentral</id>
<name>Artifactory Central</name>
<url>http://172.17.0.1:8081/artifactory/centralmirror</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

<profiles>
<!-- Configure the JBoss Community Maven repository -->
<profile>
<id>central-mirror</id>
<repositories>
<repository>
<id>central-mirror-repository</id>
<url>http://172.17.0.1:8081/artifactory/centralmirror</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central-mirror-plugin-repository</id>
<url>http://172.17.0.1:8081/artifactory/centralmirror</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<!-- Configure the JBoss Community Maven repository -->
<profile>
<id>jboss-community-repository</id>
<repositories>
<repository>
<id>jboss-community-repository</id>
<url>http://172.17.0.1:8081/artifactory/jboss</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-community-plugin-repository</id>
<url>http://172.17.0.1:8081/artifactory/jboss</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>central-mirror</activeProfile>
<activeProfile>jboss-community-repository</activeProfile>
</activeProfiles>
</settings>