Skip to content

Latest commit

 

History

History
116 lines (101 loc) · 8.16 KB

CONFIGURATION-AS-CODE.md

File metadata and controls

116 lines (101 loc) · 8.16 KB

Configuration As Code

Jenkins Configuration As Code

Properties

EC2FleetCloud

Definition

Property Type Required Description
name string yes, default "" A unique name for Jenkins cloud. "" signals the plugin to generate a unique default name for the Cloud. e.g. FleetCloud-jBGChqOP
awsCredentialsId string no, default null Leave blank to use AWS EC2 instance role
computerConnector object yes for example sshConnector
region string yes us-east-2, full list
fleet string yes my-fleet
endpoint string no Set only if you need to use custome endpoint http://a.com
fsRoot string no my-root
privateIpUsed boolean no, default false connect to EC2 instance by private id instead of public
alwaysReconnect boolean no, default false
labelString string yes
idleMinutes int no, default 0
minSize int no, default 0
maxSize int no, default 0
minSpareSize int no, default 0
maxTotalUses int no, default -1 i.e. unlimited uses
numExecutors int no, default 1
addNodeOnlyIfRunning boolean no, default false
restrictUsage boolean no, default false if true fleet nodes will executed only jobs with same label
executorScaler object no, default NoScaler Can be set to noScaler, weightedScaler, or nodeHardwareScaler. nodeHardwareScaler has subfields of vCpuPerExecutor and memoryGiBPerExecutor
disableTaskResubmit boolean no, default false
initOnlineTimeoutSec int no, default 180
initOnlineCheckIntervalSec int no, default 15
cloudStatusIntervalSec int no, default 10
noDelayProvision boolean no, default false

EC2FleetLabelCloud

More about this type here

Definition

Examples

EC2FleetCloud (min set of properties)

jenkins:
  clouds:
    - eC2Fleet:
        name: ec2-fleet
        computerConnector:
            sshConnector:
                credentialsId: cred
                sshHostKeyVerificationStrategy:
                  NonVerifyingKeyVerificationStrategy
        region: us-east-2
        fleet: my-fleet
        minSize: 1
        maxSize: 10

EC2FleetCloud (All properties)

jenkins:
  clouds:
    - eC2Fleet:
        name: ec2-fleet
        awsCredentialsId: xx
        computerConnector:
            sshConnector:
                credentialsId: cred
        region: us-east-2
        endpoint: http://a.com
        fleet: my-fleet
        fsRoot: my-root
        privateIpUsed: true
        alwaysReconnect: true
        labelString: myLabel
        idleMinutes: 33
        minSize: 15
        maxSize: 90
        numExecutors: 12
        addNodeOnlyIfRunning: true
        restrictUsage: true
        executorScaler: "noScaler"
        initOnlineTimeoutSec: 181
        initOnlineCheckIntervalSec: 13
        cloudStatusIntervalSec: 11
        disableTaskResubmit: true
        noDelayProvision: true

EC2FleetCloud (Node Hardware Scaling)

jenkins:
  clouds:
    - eC2Fleet:
        name: ec2-fleet
        computerConnector:
            sshConnector:
                credentialsId: cred
                sshHostKeyVerificationStrategy:
                  NonVerifyingKeyVerificationStrategy
        region: us-east-2
        fleet: my-fleet
        minSize: 1
        maxSize: 10
        executorScaler:
            nodeHardwareScaler:
              memoryGiBPerExecutor: 2
              vCpuPerExecutor: 3