Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing parameter '--container-definitions': Expected: '=', received: 'EOF' for input: #16

Closed
realplatanopapi opened this issue May 8, 2019 · 5 comments

Comments

@realplatanopapi
Copy link

Hello,

I'm running into trouble when using the update-task-definition command. I keep getting this error, and I'm having a hard time figuring out why:

REVISION=$(aws ecs register-task-definition \
    --family api \
    --container-definitions "${CCI_ORB_AWS_ECS_CONTAINER_DEFS}" \
    "$@" \
    --output text \
    --query 'taskDefinition.taskDefinitionArn')
echo "Registered task definition: ${REVISION}"
echo "export CCI_ORB_AWS_ECS_REGISTERED_TASK_DFN='${REVISION}'" >> $BASH_ENV

/tmp/.bash_env-5cd1e0d546a0c30008435cb0-0-build: line 4: unexpected EOF while looking for matching `"'
/tmp/.bash_env-5cd1e0d546a0c30008435cb0-0-build: line 10: syntax error: unexpected end of file

Error parsing parameter '--container-definitions': Expected: '=', received: 'EOF' for input:

^
Exited with code 255

Here's how I'm using the command in my config.yml:

- aws-ecs/update-task-definition:
          family: 'api'
          container-image-name-updates: 'container=api-server,image-and-tag=${AWS_ECR_ACCOUNT_URL}/api:${CIRCLE_SHA1}'

And here's the task definition that I'm trying to update:

{
  "ipcMode": null,
  "executionRoleArn": null,
  "containerDefinitions": [
    {
      "dnsSearchDomains": null,
      "logConfiguration": null,
      "entryPoint": null,
      "portMappings": [
        {
          "hostPort": 0,
          "protocol": "tcp",
          "containerPort": 80
        }
      ],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [ /* ... */ ],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": 256,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "...",
      "startTimeout": null,
      "dependsOn": null,
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": null,
      "essential": true,
      "links": null,
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": null,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "api-server"
    }
  ],
  "placementConstraints": [],
  "memory": null,
  "taskRoleArn": null,
  "compatibilities": [
    "EC2"
  ],
  "taskDefinitionArn": "...",
  "family": "api",
  "requiresAttributes": [
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.ecr-auth"
    }
  ],
  "pidMode": null,
  "requiresCompatibilities": [],
  "networkMode": null,
  "cpu": null,
  "revision": 43,
  "status": "ACTIVE",
  "proxyConfiguration": null,
  "volumes": []
}

Any help would be much appreciated!

P.S. This is a dope orb.

@iynere
Copy link
Contributor

iynere commented May 8, 2019

hmmmm, it's not supposed to be --container-definitions=$VALUE instead of --container-definitions $VALUE, is it ? @restlessbit

@lokst do you have thoughts ?

@lokst
Copy link
Contributor

lokst commented May 8, 2019

@iynere It looks like there may have been some issue with the value of ${CCI_ORB_AWS_ECS_CONTAINER_DEFS} that was created by the orb , I think it would be good if we could take a look at the job

@restlessbit Could you open a support ticket at https://support.circleci.com/hc/en-us/requests/new and include a link to the CircleCI job that had failed, so that we can investigate further?

@realplatanopapi
Copy link
Author

@lokst Thank you! Just created a ticket.

@lokst
Copy link
Contributor

lokst commented May 22, 2019

Thanks @restlessbit for working with us on this. Closing this issue as we have found the cause of the error and a workaround (remove single quote).
Opened #18 to track work on a fix on this.

@lokst lokst closed this as completed May 22, 2019
@realplatanopapi
Copy link
Author

@lokst 🙏 Thank you for the help!! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants