josmo / drone-ecs

Drone plugin for triggering Amazon EC2 Container Service (ECS) deployments
Apache License 2.0
30 stars 41 forks source link

deploy fail with image peloton/drone-ecs #39

Open diamond520 opened 5 years ago

diamond520 commented 5 years ago

I use image: peloton/drone-ecs to deploy. But recently I met some problem when deploying.

This is fail info below:

1 | Drone AWS ECS Plugin built
2 | 2019/07/04 08:26:29 InvalidParameter: 1 validation error(s) found.
3 | - missing required field, UpdateServiceInput.NetworkConfiguration.AwsvpcConfiguration.Subnets.

and this is deploy part of my .drone.yml:

  deployDevProxy:
    image: peloton/drone-ecs
    region: ap-northeast-1
    service: ****-frontend-dev
    container_name: ****-frontend-proxy
    family: ****-frontend-dev
    cluster: ****-ECS-dev
    task_role_arn: ****-frontend-task-role
    docker_image: ********.dkr.ecr.ap-northeast-1.amazonaws.com/****-frontend
    tag: develop
    environment_variables:
      - NODE_ENV=development
      - API_ENDPOINT=https://****/api
      - BUILD_TAG=${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
    cpu: 256
    memory: 256
    desired_count: 1
    deployment_configuration:
      - 50 200
    log_driver: awslogs
    log_options:
      - awslogs-group=****-frontend
      - awslogs-region=ap-northeast-1
      - awslogs-stream-prefix=/dev
    port_mappings:
      - 0 8080
    when:
      branch: [develop]

I've tried to use specific version image: peloton/drone-ecs:1.0.6 for building, it's okay in process. Could I get some suggestions to trace/correct this error?

josmo commented 4 years ago

@diamond520 are you saying that version 1.0.6 works but latest doesn't? There was a change I pulled into 1.0.7 that deals with network configuration that could be the issue. I didn't think it had a breaking change but that would be the first place to look at.

diamond520 commented 4 years ago

@josmo Yes, v1.0.6 is work for me, but latest will failed while processing.

josmo commented 4 years ago

Ok looks like it was some of the changes around line 293 dealing with awsvpc. I'll take a look when I get a chance, but if you want to PR a change that would be were to start :)

IvoPereira commented 4 years ago

I've noticed that I have stumbled into this issue as well using latest tag.

For now I will be using 1.0.6.