Skip to content

Commit

Permalink
ansible,jenkins: use "agent" naming
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored and richardlau committed Mar 18, 2024
1 parent 250493e commit 204bd32
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Unsorted stuff of things we need to do/think about
hosts (or set up a new jump host)
- [x] copy release (staging) keys to release machines
- [ ] backup host: generate config, install rsnapshot
- [ ] switch to slaveLog for all jenkins instances lacking stdout redirection
- [ ] switch to agentLog for all jenkins instances lacking stdout redirection
(note: this depends on init type!)
- [ ] add iptables-save-persistent to cron on ci hosts
- [ ] [unencrypted host](https://gist.github.com/jbergstroem/5c308089c26e7ae7529a0ef2df92a7f9)
Expand Down
2 changes: 1 addition & 1 deletion ansible/aix61-standalone/ansible-playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
tags: user

- name: Jenkins | Download Jenkins agent.jar
get_url: url=https://ci.nodejs.org/jnlpJars/agent.jar dest=/home/{{ server_user }}/slave.jar validate_certs=no
get_url: url=https://ci.nodejs.org/jnlpJars/agent.jar dest=/home/{{ server_user }}/agent.jar validate_certs=no
tags: jenkins

- name: Jenkins | Copy S20jenkins
Expand Down
2 changes: 1 addition & 1 deletion ansible/aix61-standalone/resources/S20jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ start )
export JOBS=4; \
export GIT_SSL_CAINFO="$HOME/ca-bundle.crt"; \
export SSL_CERT_FILE="$HOME/ca-bundle.crt"; \
java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/slave.jar" \
java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/agent.jar" \
-secret {{secret}} \
-jnlpUrl https://ci.nodejs.org/computer/{{id}}/jenkins-agent.jnlp >$jenkins_log_file 2>&1 &'
;;
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/jenkins/worker/upgrade-jar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- name: download agent.jar
get_url:
url: "{{ jenkins_agent_jar }}"
dest: '{{ home }}/{{ server_user }}/slave.jar'
dest: '{{ home }}/{{ server_user }}/agent.jar'
mode: 0644
force: yes

Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/files/alpine.monitrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ set logfile syslog
set daemon 30

check process jenkins
matching slave.jar
matching agent.jar
start program = "/sbin/rc-service -q jenkins zap && /sbin/rc-service -q jenkins start"
stop program = "/sbin/rc-service -q jenkins stop"
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- name: download agent.jar
get_url:
url: "{{ jenkins_agent_jar }}"
dest: '{{ home }}/{{ server_user }}/slave.jar'
dest: '{{ home }}/{{ server_user }}/agent.jar'
mode: 0644
timeout: 60
force: yes
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/aix.rc2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ start )
export PATH="/opt/freeware/bin:/usr/opt/python3/bin/:$PATH"; \
export OSTYPE=AIX72; \
export JOBS={{ jobs_env }}; \
/usr/bin/java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/slave.jar" \
/usr/bin/java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/agent.jar" \
-secret {{secret}} \
-jnlpUrl {{jenkins_url}}/computer/{{inventory_hostname}}/jenkins-agent.jnlp >$jenkins_log_file 2>&1 &'
;;
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/freebsd.initd.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jenkins_env=" \
CC=cc \
CXX=c++"

jenkins_jar="/home/{{ server_user }}/slave.jar"
jenkins_jar="/home/{{ server_user }}/agent.jar"
jenkins_log_file="/home/{{ server_user }}/${name}_console.log"
jenkins_args="-Xmx{{ server_ram|default('128m') }} -jar ${jenkins_jar} \
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp \
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/ibmi_start.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ echo "done"

########################### Now start our agent

export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -Dos400.stdio.convert=N -Djava.net.preferIPv4Stack=true -jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 "
export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -Dos400.stdio.convert=N -Djava.net.preferIPv4Stack=true -jar {{ home }}/{{ server_user }}/agent.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 "
echo $START_CMD
exec /QOpenSys/usr/bin/system -v -kpiveO "SBMJOB CMD(QSH CMD('echo starting Jenkins agent && cd $HOME && env && touch $HOME/jenkins.log && setccsid 1208 $HOME/jenkins.log && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS"
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<exec_method type='method'
name='start'
exec='{{ java_path[os] }} -Dsun.security.pkcs11.enable-solaris=false -Xmx{{ server_ram|default('128m') }} -jar /home/{{ server_user }}/slave.jar -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp -secret {{ secret }}'
exec='{{ java_path[os] }} -Dsun.security.pkcs11.enable-solaris=false -Xmx{{ server_ram|default('128m') }} -jar /home/{{ server_user }}/agent.jar -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp -secret {{ secret }}'
timeout_seconds='30' />

<exec_method type="method"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/start.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export DESTCPU="{{ arch }}"
export PATH="/usr/local/opt/python3/Frameworks/Python.framework/Versions/Current/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export PATH="$(brew --prefix)/opt/ccache/libexec:$PATH"
{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} \
-jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} \
-jar {{ home }}/{{ server_user }}/agent.jar -secret {{ secret }} \
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/systemd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Environment="DESTCPU={{ arch }}"
Environment="ARCH={{ arch }}"

ExecStart=/usr/bin/java -Xmx{{ server_ram|default('128m') }} \
-jar /home/{{ server_user }}/slave.jar \
-jar /home/{{ server_user }}/agent.jar \
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp \
-secret {{ secret }}
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/zos_start.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export CFLAGS="-q64"
export LDFLAGS="-q64"
{{ java_path[os] }} -Dfile.encoding=ISO8859_1 -Xmx{{ server_ram|default('128m') }} \
-jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} \
-jar {{ home }}/{{ server_user }}/agent.jar -secret {{ secret }} \
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/jenkins-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 &
EOF
2 changes: 1 addition & 1 deletion jenkins/scripts/VersionSelectorScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ println "Node.js major version: $nodeMajorVersion"
if (parameters['NODEJS_VERSION'])
println "Node.js version: ${new String(parameters['NODEJS_VERSION'])}"

// NOTE: this assumes that the default "Slaves"->"Name" in the Configuration
// NOTE: this assumes that the default "Agents"->"Name" in the Configuration
// Matrix is left as "nodes", if it's changed then `it.nodes` below won't work
// and returning a result with a "nodes" property won't work.
result['nodes'] = []
Expand Down

0 comments on commit 204bd32

Please sign in to comment.