Installing GoCD agent on MacOS
Download the MacOS installer for GoCD Agent from downloads page.
Unzip the installer in a directory of your choice. It creates a sub-directory with the name
Mark the directory as not quarantined by MacOS so that it allows the GoCD Agent to be started:
# Assuming, for example, that the directory is "go-agent-20.5.0". $ cd go-agent-20.5.0 $ xattr -d -r com.apple.quarantine . xattr: [Errno 13] Permission denied: './jre/Contents/Home/lib/server/classes.jsa' xattr: [Errno 13] Permission denied: './jre/Contents/Home/legal/jdk.dynalink/dynalink.md' ... # These "Permission denied" warnings can be ignored.
Managing the GoCD agent process
The GoCD agent script must be run with one of the following arguments:
|The GoCD agent will be started in the foreground
|The GoCD agent will be started as a daemon in the background
|The GoCD agent will be stopped
|The GoCD agent will be restarted
Configuring the GoCD agent
After installing the GoCD agent, you must first configure the agent with the hostname (or IP address) of your GoCD server, in order to do this:
./wrapper-config/wrapper-properties.confin your favourite text editor.
- Follow the instructions in the file to configure the GoCD server url
- Save the file and exit your editor.
service go-agent [start|restart]to (re)start the agent.
Registering your agent with the server
For security reasons, all newly installed GoCD agents need to be enabled on the GoCD server before work is assigned to them. This prevents an unauthorized person from getting access to your source code. To enable a newly installed GoCD agent, do the following:
- Open the GoCD server dashboard
- Follow the instructions here to find the agent you’ve just installed on the list and add the agent to your cloud. The GoCD server will now schedule work for this agent.