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

Declarative Agent Declaration Doesn't Allow Using Fargate #95

Closed
ghost opened this issue May 1, 2019 · 1 comment · Fixed by #100
Closed

Declarative Agent Declaration Doesn't Allow Using Fargate #95

ghost opened this issue May 1, 2019 · 1 comment · Fixed by #100

Comments

@ghost
Copy link

ghost commented May 1, 2019

When using the declarative agent declaration to define or extend an agent with the Fargate launch type, the plugin fails to register the Task Definition with an error that states:

[jenkins-60gn8]: Error in provisioning; agent=com.cloudbees.jenkins.plugins.amazonecs.ECSSlave[jenkins-60gn8]
com.amazonaws.services.ecs.model.ClientException: Fargate requires task definition to have execution role ARN to support ECR images. (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Request ID: eb36ec6a-6c41-11e9-ae73-89fda2289aa7)

Upon doing some digging, it looks like com.cloudbees.jenkins.plugins.amazonecs.pipeline.ECSDeclarativeAgent does not have a property for executionRole but com.cloudbees.jenkins.plugins.amazonecs.ECSTaskTemplate does. I believe this is leading to the execution role not being passed in the RegisterTaskDefinition call.

@pgarbe
Copy link
Contributor

pgarbe commented May 3, 2019

That's a good point. The executionRole is not (yet) supported with the declarative syntax.

Also, during merge the executionRole gets lost when you inherit from a pre-defined configuration.

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

Successfully merging a pull request may close this issue.

1 participant