Comments (5)
Which version are you using? The declarative support comes with 1.20 with is currently in beta (1.20-beta2)
from amazon-ecs-plugin.
On version 1.19, which is the latest officially at this moment, you can still use this:
pipeline {
agent none
stages {
stage('Test') {
agent { label 'fargate-slave'}
steps {
sh 'echo hello from fargate'
}
}
}
}
And works as long as you setup correctly fargate on settings and use that label.
from amazon-ecs-plugin.
Which version are you using? The declarative support comes with 1.20 with is currently in beta (1.20-beta2)
Please, could help us?
We install 1.20-beta2 but we are not having success in the declarative override:
pipeline {
agent any
stages {
stage('Test') {
agent {
ecs {
cloud 'cloud-default'
label 'ecs'
image 'jenkinsci/jnlp-slave'
launchType 'FARGATE'
memory 4096
cpu 2048
subnets 'subnet-xxxxxxxxxxxxx'
securityGroups 'sg-xxxxxxxxxxx'
assignPublicIp true
taskrole 'arn:aws:iam::xxxxxxxxxxxxxxx:role/ecsTaskExecutionRole'
inheritFrom 'fargate-template'
}
}
steps {
sh 'echo hello'
}
}
}
}
Jenkins output:
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] ecsTaskTemplate
[Pipeline] // ecsTaskTemplate
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Cloud does not exist: cloud-default
Finished: FAILURE
Jenkins Log:
Apr 11, 2019 9:13:08 PM INFO com.cloudbees.jenkins.plugins.amazonecs.pipeline.ECSDeclarativeAgent getAsArgs
In getAsArgs. label: ecs
Apr 11, 2019 9:13:08 PM INFO com.cloudbees.jenkins.plugins.amazonecs.pipeline.ECSDeclarativeAgent getAsArgs
In getAsArgs. argMap: {assignPublicIp=true, cloud=cloud-default, cpu=2048, image=jenkinsci/jnlp-slave, inheritFrom=fargate-template, label=ecs, launchType=FARGATE, memory=4096, name=ecs, overrides=[assignPublicIp, cloud, cpu, image, inheritFrom, label, launchType, memory, securityGroups, subnets, taskrole], privileged=false, securityGroups=sg-xxxxxxxx, subnets=subnet-xxxxxxxx, taskrole=arn:aws:iam::xxxxxxxx:role/ecsTaskExecutionRole}
Apr 11, 2019 9:13:08 PM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
test_pipeline #36 completed: FAILURE
from amazon-ecs-plugin.
In your Jenkins settings (Manage Jenkins -> Configure System), did you set up a "Amazon EC2 Container Services Cloud" with name"default-cloud"? Maybe this is missing?
from amazon-ecs-plugin.
closed. further discussion in #92
from amazon-ecs-plugin.
Related Issues (20)
- Enhancement: Retry launch failure due to network interface provision issues HOT 1
- Plugin Does Not Respect Non-proxy Hosts Configuration
- InvalidParameterException: Override argument cannot be null, Creating Task in cluster null HOT 2
- After jenkins version upgrade launch type is missing HOT 1
- Region is not available HOT 1
- ECS tasks are getting stopped by the error Stopped by Jenkins Amazon ECS PlugIn and exit code- 143 HOT 1
- Amazon Elastic Container Service (ECS) / Fargate plugin Version1.48 is not working HOT 2
- API - Manage Cloud Nodes
- The number of executors is not set on ECS Agent
- Add support for Sidecars in ECS Template
- Two tasks started when we have the condition in the pipeline HOT 1
- jenkinsURL how to change it
- CannotCreateVolumeError: unsupported Dockerfile contains VOLUME instruction HOT 1
- Add automatic restart of pipeline if agent is terminated (useful for spot instances)
- Add possibility to override ephemeralStorageSizeInGiB from declarative
- ECS Agents Re-used unexpectedly HOT 4
- URGENT: ECS Fargate Slaves channel closed exception randomly during pipeline execution HOT 1
- Add CLI args for Launcher
- Pls add the region us-west-1 (Calgary) - CANADA
- taskDefinitionOverride not getting checked when retain agent is enabled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-plugin.