def label = "jenkins-test-build-${UUID.randomUUID().toString()}"podTemplate(label: label, yaml: """apiVersion: v1kind: Podmetadata:labels:slave: jenkins-slave-testing-buildspec:activeDeadlineSeconds: 3600containers:- name: slaveimage: '<ecr-repo>/jenkins-slave'tty: truecommand:- catnodeSelector:xyz.com/app: cibuildtolerations:- effect: NoSchedulekey: xyz.com/abc.xyz.comoperator: Equalvalue: cibuild"""){node (label) {withEnv(['USER=jenkins']) {container('slave') {stage("test") {sh "echo test"}}}}}
Combining pods, parent: Pod(apiVersion=v1, kind=Pod, metadata=ObjectMeta(annotations=null, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={slave=jenkins-slave-testing-build}, managedFields=[], name=null, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=PodSpec(activeDeadlineSeconds=3600, affinity=null, automountServiceAccountToken=null, containers=[Container(args=[], command=[cat], env=[], envFrom=[], image=<ecrrepo>/jenkins-slave, imagePullPolicy=null, lifecycle=null, livenessProbe=null, name=slave, ports=[], readinessProbe=null, resources=null, securityContext=null, stdin=null, stdinOnce=null, terminationMessagePath=null, terminationMessagePolicy=null, tty=true, volumeDevices=[], volumeMounts=[VolumeMount(mountPath=null, mountPropagation=null, name=docker-sock, readOnly=null, subPath=null, subPathExpr=null, additionalProperties={})], workingDir=null, additionalProperties={})], dnsConfig=null, dnsPolicy=null, enableServiceLinks=null, hostAliases=[], hostIPC=null, hostNetwork=null, hostPID=null, hostname=null, imagePullSecrets=[], initContainers=[], nodeName=null, nodeSelector={xyz.com/app=cibuild}, preemptionPolicy=null, priority=null, priorityClassName=null, readinessGates=[], restartPolicy=null, runtimeClassName=null, schedulerName=null, securityContext=null, serviceAccount=null, serviceAccountName=null, shareProcessNamespace=null, subdomain=null, terminationGracePeriodSeconds=null, tolerations=[Toleration(effect=NoSchedule, key=xyz.com/abc.xyz.com, operator=Equal, tolerationSeconds=null, value=cibuild, additionalProperties={})], volumes=[Volume(awsElasticBlockStore=null, azureDisk=null, azureFile=null, cephfs=null, cinder=null, configMap=null, csi=null, downwardAPI=null, emptyDir=null, fc=null, flexVolume=null, flocker=null, gcePersistentDisk=null, gitRepo=null, glusterfs=null, hostPath=null, iscsi=null, name=null, nfs=null, persistentVolumeClaim=null, photonPersistentDisk=null, portworxVolume=null, projected=null, quobyte=null, rbd=null, scaleIO=null, secret=null, storageos=null, vsphereVolume=null, additionalProperties={})], additionalProperties={idleMinutes=null}), status=null, additionalProperties={})
Oct 18, 2019 8:58:18 AM INFO org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution$PodTemplateCallback finished
Removing pod template jenkins-test-build-87928862-54e0-44c3-9be4-c68d414d4427-w9jpl from cloud kubernetes
Oct 18, 2019 8:58:18 AM INFO org.csanchez.jenkins.plugins.kubernetes.pod.retention.Reaper eventReceived
cibuild/jenkins-test-build-87928862-54e0-44c3-9be4-c68d414d44-d2878 was just deleted, so removing corresponding Jenkins agent
Oct 18, 2019 8:58:18 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave deleteSlavePod
Terminated Kubernetes instance for agent cibuild/jenkins-mbx-test-build-87928862-54e0-44c3-9be4-c68d414d44-d2878
Oct 18, 2019 8:58:18 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
Disconnected computer jenkins-test-build-87928862-54e0-44c3-9be4-c68d414d44-d2878
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fd798b7c-39cf-41f4-b99b-8ebd5067dd6e%40googlegroups.com.
activeDeadlineSeconds has passed.podRetention is set to 'never()' or 'onFailure()', pod is deleted after this deadline is passed.To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/691690fb-e9bf-446e-a55f-8883e47cde66%40googlegroups.com.
def label = "jenkins-test-build-${UUID.randomUUID().toString()}"
podTemplate(label: label, activeDeadlineSeconds: 3600, yaml: """
apiVersion: v1kind: Podmetadata:labels:slave: jenkins-slave-testing-buildspec:
containers:
- name: slaveimage: '<ecr-repo>/jenkins-slave'tty: truecommand:- catnodeSelector:xyz.com/app: cibuildtolerations:- effect: NoSchedulekey: xyz.com/abc.xyz.comoperator: Equalvalue: cibuild"""){node (label) {withEnv(['USER=jenkins']) {container('slave') {stage("test") {sh "echo test"}}}}}
Oct 18, 2019 9:57:39 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer
Computer KubernetesComputer name: jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q slave: null completed task PlaceholderExecutable:ExecutorStepExecution.PlaceholderTask{runId=testing#47,label=jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q,context=CpsStepContext[5:node]:Owner[testing/47:testing #47],cookie=2b863d15-f6f0-431f-8081-5eea211b992b,auth=null}
Oct 18, 2019 9:57:39 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
Terminating Kubernetes instance for agent jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q
Oct 18, 2019 9:57:39 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud
Building connection to Kubernetes kubernetes URL https://kubernetes.default namespace cibuild
Oct 18, 2019 9:57:39 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud
Connected to Kubernetes kubernetes URL https://kubernetes.default/
Oct 18, 2019 9:57:39 AM INFO org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution$PodTemplateCallback finished
Removing pod template jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de7171c-npz46 from cloud kubernetes
Oct 18, 2019 9:57:39 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave deleteSlavePod
Terminated Kubernetes instance for agent cibuild/jenkin-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q
Oct 18, 2019 9:57:39 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
Disconnected computer jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q
Oct 18, 2019 9:57:39 AM FINE org.csanchez.jenkins.plugins.kubernetes.pod.retention.Reaper
received deletion notice for cibuild/jenkins-test-build-ae2e7dee-8f0f-48b8-8a3f-39fd1de717-0ct7q which does not seem to correspond to any Jenkins agent
Terminated Kubernetes instance for agent cibuild/jenkins-test-build-87928862-54e0-44c3-9be4-c68d414d44-d2878
Oct 18, 2019 8:58:18 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate
Disconnected computer jenkins-test-build-87928862-54e0-44c3-9be4-c68d414d44-d2878
Thank you in advance for your help.
- drpm
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fd798b7c-39cf-41f4-b99b-8ebd5067dd6e%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/691690fb-e9bf-446e-a55f-8883e47cde66%40googlegroups.com.