Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGDIGGER-64 - enable master to slave security subsystem #24

Merged
merged 2 commits into from Dec 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker/README.md
Expand Up @@ -15,7 +15,7 @@ S2I build is required in order to install new plugins and configuration
Install s2i build tool from: https://github.com/openshift/source-to-image/releases/tag/v1.1.3
Build openshift jenkins image with our modifications on your local machine

cd jenkins1-centos
cd jenkins2-centos
docker build . -t aerogear/jenkins-2-centos7-s2i

Execute s2i build command:
Expand Down Expand Up @@ -85,8 +85,8 @@ The following script is an example of downloading the sdk installation

```
wget --output-document=android-sdk.tgz --quiet https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
tar xzf android-sdk.tgz
tar xzf android-sdk.tgz

android-sdk-linux/tools/android update sdk --all --no-ui --filter platform-tools,tools,build-tools-25.0.0,android-25,addon-google_apis_x86-google-21,extra-android-support,extra-google-google_play_services

```
Expand All @@ -95,7 +95,7 @@ This will build the final image with the android sdk version that was installed

```
s2i build <directory-where-sdk-has-been-installed> docker.io/aerogear/android-sdk-sti aerogear/jenkins-android-slave:<version>

```

For release builds, publish the image to the openshift internal registry - please refer to this link for more info
Expand Down
6 changes: 5 additions & 1 deletion docker/jenkins2-centos/Dockerfile
Expand Up @@ -3,4 +3,8 @@ FROM openshift/jenkins-2-centos7
COPY ./contrib/kube-slave-common.sh /usr/local/bin/kube-slave-common.sh

COPY plugins.txt /opt/openshift/configuration/plugins.txt
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt && \
mkdir $JENKINS_HOME/secrets && \
echo "false" > $JENKINS_HOME/secrets/slave-to-master-security-kill-switch && \
## Prevent admins from changing master to slave security option
chmod 444 $JENKINS_HOME/secrets/slave-to-master-security-kill-switch
7 changes: 4 additions & 3 deletions docker/jenkins2-centos/configuration/configuration.xml.tpl
Expand Up @@ -2,8 +2,10 @@
<hudson>
<disabledAdministrativeMonitors/>
<version>1.651</version>
<numExecutors>5</numExecutors>
<mode>NORMAL</mode>
<!-- Disabling master node -->
<label>disabled-node</label>
<numExecutors>0</numExecutors>
<mode>EXCLUSIVE</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
<permission>hudson.model.Computer.Configure:admin</permission>
Expand Down Expand Up @@ -50,7 +52,6 @@
</views>
<primaryView>All</primaryView>
<slaveAgentPort>${JNLP_PORT}</slaveAgentPort>
<label>master</label>
<nodeProperties/>
<globalNodeProperties/>
<noUsageStatistics>true</noUsageStatistics>
Expand Down