That gave me an idea that seems to have worked In my Docker file that extends from gocd/gocd-server:v17.8.0 I added these couple of lines RUN mkdir -vp /godata/config ADD config/ /godata/config/
Add create a skeleton config/cruise-config.xml <?xml version="1.0" encoding="utf-8"?> <cruise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cruise-config.xsd" schemaVersion="94"> <server artifactsdir="artifacts" agentAutoRegisterKey="XXXX" webhookSecret="XXXX" commandRepositoryLocation="default" serverId="XXXX" /> </cruise> And then in the compose file for my stack for the agent service I was able to set these env variables environment: GO_SERVER_URL: "https://gocd-server:8154/go" AGENT_AUTO_REGISTER_KEY: "XXXX" AGENT_AUTO_REGISTER_RESOURCES: "java7,gradle" AGENT_AUTO_REGISTER_HOSTNAME: "gocd-agent-java7-gradle17" Thanks Steve On Wednesday, 2 August 2017 12:01:27 UTC+1, Ketan Padegaonkar wrote: > > > > On Wed, Aug 2, 2017 at 4:16 PM Steve Atkinson <[email protected] > <javascript:>> wrote: > >> Is there any mechanism to tell the server up front before it starts what >> key to use? >> > > You'd have to use volume mounts and pre-populate that directory with a > cruise-config.xml with a key of your choice. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
