I would like to use the Amazon ECS plugin with Fargate to create Jenkins build agents. I've tried a number of things in the pipeline to get this to work but I cannot find the right configuration.
Any assistance is appreciated!
My current setup contains:
Amazon EC2 Container Service cloud:
Name: aws-cloud
Amazon ECS Credentials: (none, host has an IAM role that should be sufficient, this Jenkins is
already managing static agents on Fargate)
AWS Region: us-east-1
ECS Cluster ID (arn:xxxxx:::cluster/jenkins-slave
ECS slave Templates:
Label: docker
Docker Image: jenkinsci/jnlp-slave
Filesystem root: /home/jenkins
Memory: 2048
CPU units 1024
Jenkinsfile:
pipeline {
agent none
stages {
stage('Test') {
agent {
ecs {
cloud 'aws-claims'
launchType 'FARGATE'
memory 2048
cpu 1024
assignPublicIp false
inheritFrom 'docker'
label 'sbt'
}
}
steps {
sh 'env'
}
}
}
}
I have tried many different variations in my pipeline to configure this but most give me a similar error.
ERROR: Unable to determine cloud configuration using: Labels: [sbt], inheritFrom: 'docker', Cloud: 'aws-cloud'