apiVersion: v1
kind: Pod
spec:
          serviceAccountName: jenkins
          volumes:
            - name: dockersock
              hostPath:
                path: /var/run/docker.sock
            - emptyDir: {}
              name: varlibcontainers
          containers:
            - name: node
              image: node:12-stretch
              tty: true
              command: ["/bin/bash"]
              workingDir: /home/jenkins/agent
              envFrom:
                - configMapRef:
                    name: pactbroker-config
                    optional: true
                - configMapRef:
                    name: sonarqube-config
                    optional: true
                - secretRef:
                   name: sonarqube-access
                   optional: true
              env:
                - name: HOME
                  value: /home/jenkins/agent
                - name: GIT_AUTH_USER
                  valueFrom:
                    secretKeyRef:
                      name: git-credentials-jl
                      key: username
                      optional: true
                - name: GIT_AUTH_PWD
                  valueFrom:
                    secretKeyRef:
                      name: git-credentials-jl
                      key: password
                      optional: true
            - name: buildah
              image: quay.io/buildah/stable:v1.9.0
              tty: true
              command: ["/bin/bash"]
              workingDir: /home/jenkins/agent
              envFrom:
                - configMapRef:
                    name: ibmcloud-config
                    optional: true
                - secretRef:
                    name: ibmcloud-apikey
                    optional: true
              env: 
                - name: HOME
                  value: /home/devops
                - name: DOCKERFILE
                  value: ./Dockerfile
                - name: CONTEXT
                  value: .
                - name: TLSVERIFY
                  value: "false"
                - name: REGISTRY_USER
                  valueFrom:
                    secretKeyRef:
                      key: REGISTRY_USER
                      name: ibmcloud-apikey
                      optional: true
                - name: REGISTRY_PASSWORD
                  valueFrom:
                    secretKeyRef:
                      key: REGISTRY_PASSWORD
                      name: ibmcloud-apikey
                      optional: true
                - name: APIKEY
                  valueFrom:
                    secretKeyRef:
                      key: APIKEY
                      name: ibmcloud-apikey
                      optional: true
              volumeMounts:
                - mountPath: /var/lib/containers
                  name: varlibcontainers
            - name: ibmcloud
              image: docker.io/garagecatalyst/ibmcloud-dev:1.0.10
              tty: true
              command: ["/bin/bash"]
              workingDir: /home/jenkins/agent
              envFrom:
                - configMapRef:
                    name: ibmcloud-config
                    optional: true
                - secretRef:
                    name: ibmcloud-apikey
                    optional: true
                - configMapRef:
                    name: artifactory-config
                    optional: true
                - secretRef:
                    name: artifactory-access
                    optional: true
              env:
                - name: CHART_NAME
                  value: base
                - name: CHART_ROOT
                  value: chart
                - name: TMP_DIR
                  value: .tmp
                - name: HOME
                  value: /home/devops
            - name: trigger-cd
              image: docker.io/garagecatalyst/ibmcloud-dev:1.0.10
              tty: true
              command: ["/bin/bash"]
              workingDir: /home/jenkins/agent
              env:
                - name: HOME
                  value: /home/devops
                - name: PROXY
                  value: http://proxy.cammis.medi-cal.ca.gov:8080
                - name: https_proxy
                  value: http://proxy.cammis.medi-cal.ca.gov:8080
              envFrom:
                - configMapRef:
                    name: gitops-repo
                    optional: true
                - secretRef:
                    name: git-credentials-jl
                    optional: true
