-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use jenkins agent instead of old script
RE #62
Showing
2 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
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
14 changes: 7 additions & 7 deletions
14
macOS/jenkins-node/ansible/roles/agent/tasks/start-jenkins-agent.yml
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Test and start the agent. Note: Connection will only begin consistently every 5th minute if changes are made. | ||
|
||
- name: Download jenkins slave script. | ||
shell: curl -o $HOME/jenkins-slave.sh https://raw.githubusercontent.com/mantidproject/mantid/main/buildconfig/Jenkins/jenkins-slave.sh | ||
- name: Download jenkins agent script. | ||
shell: curl -o $HOME/jenkins-agent.sh https://raw.githubusercontent.com/mantidproject/mantid/refs/heads/main/buildconfig/Jenkins/jenkins-agent.sh | ||
|
||
- name: Make the slave script executable. | ||
shell: chmod 777 $HOME/jenkins-slave.sh | ||
- name: Make the agent script executable. | ||
shell: chmod 777 $HOME/jenkins-agent.sh | ||
|
||
- name: Check the Jenkins agent connection script. | ||
script: ./check-connection.sh {{ agent_name }} {{ agent_secret }} | ||
|
||
- name: Setup a chrontab entry to run the agent script every 5th minute. | ||
- name: Setup a crontab entry to run the agent script every 5th minute. | ||
ansible.builtin.cron: | ||
name: "Run slave script" | ||
name: "Run agent script" | ||
minute: "*/5" | ||
job: "$HOME/jenkins-slave.sh {{ agent_name }} {{ agent_secret }}" | ||
job: "$HOME/jenkins-agent.sh {{ agent_name }} {{ agent_secret }} >> ~/agentlog.txt 2>&1" |