falldamagestudio / UE-Jenkins-BuildSystem

Build Unreal Engine & games with Jenkins on GKE/GCE
MIT License
46 stars 11 forks source link

Kubernetes + Linux jobs use `inbound-agent:4.3-4` as image instead of custom image #39

Closed Kalmalyzer closed 1 year ago

Kalmalyzer commented 3 years ago

When running Linux job on Kubernetes, the jnlp container seems to use inbound-agent:4.3-4 as its Docker image. It does not cause any errors now, but may result in compatibility problems later. Why does this happen in the first place?

Why aren't these lines doing the job? (from deploy.sh)

--set agent.image=${UE_JENKINS_INBOUND_AGENT_LINUX_IMAGE_ONLY} \
--set agent.tag=${UE_JENKINS_INBOUND_AGENT_LINUX_TAG_ONLY} \

4.3-4 does not occur in the config repo, there's our specific one and 4.6-1 only...

Example log from build job:

[2021-08-02T14:46:38.853Z] Started by user Mikael Kalms
[2021-08-02T14:46:39.499Z] Obtained Jenkinsfiles/build_engine_linux_git_kubernetes.groovy from git https://github.com/Kalmalyzer/UE-Jenkins-Engine
[2021-08-02T14:46:39.499Z] Running in Durability level: MAX_SURVIVABILITY
[2021-08-02T14:46:39.938Z] [Pipeline] Start of Pipeline
[2021-08-02T14:46:40.645Z] [Pipeline] podTemplate
[2021-08-02T14:46:40.678Z] [Pipeline] {
[2021-08-02T14:46:40.714Z] [Pipeline] node
[2021-08-02T14:46:43.289Z] Created Pod: kubernetes default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72
[2021-08-02T14:46:43.388Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Scheduled] Successfully assigned default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72 to gke-jenkins-jenkins-agent-linux-node--3df23e52-vkb1
[2021-08-02T14:46:44.289Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Pulled] Container image "jenkins/inbound-agent:4.3-4" already present on machine
[2021-08-02T14:46:44.329Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Created] Created container jnlp
[2021-08-02T14:46:44.412Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Started] Started container jnlp
[2021-08-02T14:46:44.421Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Pulled] Container image "europe-west1-docker.pkg.dev/kalms-ue-jenkins-buildsystem/docker-build-artifacts/ue-jenkins-buildtools:commit-54bf5a0-linux" already present on machine
[2021-08-02T14:46:44.441Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Created] Created container ue-jenkins-buildtools-linux
[2021-08-02T14:46:44.526Z] [Normal][default/k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72][Started] Started container ue-jenkins-buildtools-linux
[2021-08-02T14:46:47.638Z] Agent k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72 is provisioned from template k8s_build_engine_linux_git_kubernetes_1-0rbgb-wjm15
[2021-08-02T14:46:47.674Z] ---
[2021-08-02T14:46:47.674Z] apiVersion: "v1"
[2021-08-02T14:46:47.674Z] kind: "Pod"
[2021-08-02T14:46:47.674Z] metadata:
[2021-08-02T14:46:47.674Z]   annotations:
[2021-08-02T14:46:47.674Z]     buildUrl: "http://jenkins-controller.default.svc.cluster.local:8080/job/k8s/job/build_engine_linux_git_kubernetes/1/"
[2021-08-02T14:46:47.674Z]     runUrl: "job/k8s/job/build_engine_linux_git_kubernetes/1/"
[2021-08-02T14:46:47.674Z]   labels:
[2021-08-02T14:46:47.674Z]     app: "jenkins-agent"
[2021-08-02T14:46:47.674Z]     jenkins/jenkins-controller-jenkins-agent: "true"
[2021-08-02T14:46:47.674Z]     jenkins/label-digest: "161e1d1f362ffe34ea4d1894c7cbe0dbd60fe3bd"
[2021-08-02T14:46:47.674Z]     jenkins/label: "k8s_build_engine_linux_git_kubernetes_1-0rbgb"
[2021-08-02T14:46:47.674Z]   name: "k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72"
[2021-08-02T14:46:47.674Z] spec:
[2021-08-02T14:46:47.674Z]   affinity:
[2021-08-02T14:46:47.674Z]     podAntiAffinity:
[2021-08-02T14:46:47.674Z]       requiredDuringSchedulingIgnoredDuringExecution:
[2021-08-02T14:46:47.674Z]       - labelSelector:
[2021-08-02T14:46:47.674Z]           matchExpressions:
[2021-08-02T14:46:47.674Z]           - key: "app"
[2021-08-02T14:46:47.674Z]             operator: "In"
[2021-08-02T14:46:47.674Z]             values:
[2021-08-02T14:46:47.674Z]             - "jenkins-agent"
[2021-08-02T14:46:47.674Z]         topologyKey: "kubernetes.io/hostname"
[2021-08-02T14:46:47.674Z]   containers:
[2021-08-02T14:46:47.674Z]   - env:
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_SECRET"
[2021-08-02T14:46:47.674Z]       value: "********"
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_AGENT_NAME"
[2021-08-02T14:46:47.674Z]       value: "k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72"
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_WEB_SOCKET"
[2021-08-02T14:46:47.674Z]       value: "true"
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_NAME"
[2021-08-02T14:46:47.674Z]       value: "k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72"
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_AGENT_WORKDIR"
[2021-08-02T14:46:47.674Z]       value: "/home/jenkins/agent"
[2021-08-02T14:46:47.674Z]     - name: "JENKINS_URL"
[2021-08-02T14:46:47.674Z]       value: "http://jenkins-controller.default.svc.cluster.local:8080/"
[2021-08-02T14:46:47.674Z]     image: "jenkins/inbound-agent:4.3-4"
[2021-08-02T14:46:47.674Z]     name: "jnlp"
[2021-08-02T14:46:47.674Z]     resources:
[2021-08-02T14:46:47.674Z]       limits: {}
[2021-08-02T14:46:47.674Z]       requests:
[2021-08-02T14:46:47.674Z]         memory: "256Mi"
[2021-08-02T14:46:47.674Z]         cpu: "100m"
[2021-08-02T14:46:47.674Z]     volumeMounts:
[2021-08-02T14:46:47.674Z]     - mountPath: "/home/jenkins/agent"
[2021-08-02T14:46:47.674Z]       name: "workspace-volume"
[2021-08-02T14:46:47.674Z]       readOnly: false
[2021-08-02T14:46:47.674Z]   - command:
[2021-08-02T14:46:47.674Z]     - "cat"
[2021-08-02T14:46:47.674Z]     image: "europe-west1-docker.pkg.dev/kalms-ue-jenkins-buildsystem/docker-build-artifacts/ue-jenkins-buildtools:commit-54bf5a0-linux"
[2021-08-02T14:46:47.674Z]     name: "ue-jenkins-buildtools-linux"
[2021-08-02T14:46:47.674Z]     tty: true
[2021-08-02T14:46:47.674Z]     volumeMounts:
[2021-08-02T14:46:47.674Z]     - mountPath: "/home/jenkins/agent"
[2021-08-02T14:46:47.674Z]       name: "workspace-volume"
[2021-08-02T14:46:47.674Z]       readOnly: false
[2021-08-02T14:46:47.674Z]   nodeSelector:
[2021-08-02T14:46:47.674Z]     jenkins-agent-linux-node-pool: "true"
[2021-08-02T14:46:47.674Z]   restartPolicy: "Never"
[2021-08-02T14:46:47.674Z]   securityContext:
[2021-08-02T14:46:47.674Z]     fsGroup: 1000
[2021-08-02T14:46:47.674Z]   tolerations:
[2021-08-02T14:46:47.674Z]   - effect: "NoSchedule"
[2021-08-02T14:46:47.674Z]     key: "jenkins-agent-linux-node-pool"
[2021-08-02T14:46:47.674Z]     operator: "Equal"
[2021-08-02T14:46:47.674Z]     value: "true"
[2021-08-02T14:46:47.674Z]   volumes:
[2021-08-02T14:46:47.674Z]   - emptyDir:
[2021-08-02T14:46:47.674Z]       medium: ""
[2021-08-02T14:46:47.674Z]     name: "workspace-volume"
[2021-08-02T14:46:47.674Z] 
[2021-08-02T14:46:47.855Z] Running on k8s-build-engine-linux-git-kubernetes-1-0rbgb-wjm15-zcm72 in /home/jenkins/agent/workspace/k8s/build_engine_linux_git_kubernetes