TestProject Forum

Docker error in CICD [SOLVED]

Im getting the following error while running the following command

$ docker run --name testproject-agent \
    -e TP_API_KEY="REPLACE_WITH_YOUR_KEY" \
    -e TP_AGENT_ALIAS="My First Agent" \
    testproject/agent:latest

I’ve also provided the correct API key and JOB ID as well
2021-08-04 10:44:55.470 [INFO ] i.t.a.b.b.c Getting execution guid for job 2z-D5bmFiUGX28tMKS_hNw

1422021-08-04 10:44:56.345 [ERROR] i.t.a.b.b.c Failed to get execution guid for job 2z-D5bmFiUGX28tMKS_hNw

1432021-08-04 10:44:56.345 [ERROR] i.t.a.m.d.h Docker will not execute job 2z-D5bmFiUGX28tMKS_hNw without an execution guid

1442021-08-04 10:44:56.345 [ERROR] i.t.a.f.c.a.d Failed processing pre-configured execution, Agent will stop now.

1452021-08-04 10:44:56.348 [INFO ] i.t.a.h Stopping…

1462021-08-04 10:44:56.349 [INFO ] i.t.a.h Stopping Identity Server client…

1472021-08-04 10:44:56.348 [INFO ] i.t.a.f.c.d Agent state machine stopped.

1482021-08-04 10:44:56.349 [INFO ] i.t.a.h Stopping Signal…

1492021-08-04 10:44:56.350 [INFO ] i.t.a.b.c.a Sent shutdown event to Signal server

1502021-08-04 10:44:56.350 [INFO ] i.t.a.b.c.a Disconnecting Signal as part of the SignalClient stop sequence

1512021-08-04 10:44:56.350 [INFO ] i.t.a.h Stopping internal web server…

1522021-08-04 10:44:56.355 [INFO ] i.t.a.b.c.a Signal disconnected - io client d

Hi,
you stated you provided a valid API key and job ID as well, where did you provide the job ID?
In a yaml file? if you did you need to use this command to start the docker:

docker-compose -f <file_name> up -d

And not:

$ docker run --name testproject-agent \
    -e TP_API_KEY="REPLACE_WITH_YOUR_KEY" \
    -e TP_AGENT_ALIAS="My First Agent" \
    -v </path/to/host/folder>:/var/testproject/agent \
    testproject/agent:latest

if you are using the command above ^ you need to add the environment variable (-e) for Job_ID