Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

[JENKINS-42846] - Rename the jenkins-slave script to jenkins-agent #106

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ FROM jenkins/slave:3.35-2
MAINTAINER Oleg Nenashev <o.v.nenashev@gmail.com>
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="3.35-2"

COPY jenkins-slave /usr/local/bin/jenkins-slave
ARG user=jenkins

ENTRYPOINT ["jenkins-slave"]
USER root
COPY jenkins-agent /usr/local/bin/jenkins-agent
RUN ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
USER ${user}

ENTRYPOINT ["jenkins-agent"]
7 changes: 6 additions & 1 deletion Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ FROM jenkins/slave:3.35-2-alpine
MAINTAINER Oleg Nenashev <o.v.nenashev@gmail.com>
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="3.35-2"

COPY jenkins-slave /usr/local/bin/jenkins-slave
ARG user=jenkins

USER root
COPY jenkins-agent /usr/local/bin/jenkins-agent
RUN ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
USER ${user}

ENTRYPOINT ["jenkins-slave"]
7 changes: 6 additions & 1 deletion Dockerfile-jdk11
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ FROM jenkins/slave:3.35-2-jdk11
MAINTAINER Oleg Nenashev <o.v.nenashev@gmail.com>
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="3.35-2"

COPY jenkins-slave /usr/local/bin/jenkins-slave
ARG user=jenkins

USER root
COPY jenkins-agent /usr/local/bin/jenkins-agent
RUN ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
USER ${user}

ENTRYPOINT ["jenkins-slave"]
6 changes: 3 additions & 3 deletions jenkins-slave → jenkins-agent
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# The MIT License
#
# Copyright (c) 2015, CloudBees, Inc.
# Copyright (c) 2015-2019, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,7 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Usage jenkins-slave.sh [options] -url http://jenkins [SECRET] [AGENT_NAME]
# Usage jenkins-agent.sh [options] -url http://jenkins [SECRET] [AGENT_NAME]
# Optional environment variables :
# * JENKINS_TUNNEL : HOST:PORT for a tunnel to route TCP traffic to jenkins host, when jenkins can't be directly accessed over network
# * JENKINS_URL : alternate jenkins URL
Expand Down Expand Up @@ -96,5 +96,5 @@ else
#TODO: Handle the case when the command-line and Environment variable contain different values.
#It is fine it blows up for now since it should lead to an error anyway.

exec $JAVA_BIN $JAVA_OPTS $JNLP_PROTOCOL_OPTS -cp /usr/share/jenkins/slave.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@"
exec $JAVA_BIN $JAVA_OPTS $JNLP_PROTOCOL_OPTS -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@"
fi
2 changes: 1 addition & 1 deletion jenkins-agent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Param(
$JavaHome = $env:JAVA_HOME
)

# Usage jenkins-slave.ps1 [options] -Url http://jenkins -Secret [SECRET] -Name [AGENT_NAME]
# Usage jenkins-agent.ps1 [options] -Url http://jenkins -Secret [SECRET] -Name [AGENT_NAME]
# Optional environment variables :
# * JENKINS_TUNNEL : HOST:PORT for a tunnel to route TCP traffic to jenkins host, when jenkins can't be directly accessed over network
# * JENKINS_URL : alternate jenkins URL
Expand Down