apiVersion: batch/v1
kind: Job
metadata:
  name: project-builder-test
spec:
  template:
    spec:
      volumes:
      - name: mvn-repo-cert
        configMap:
          name: mvn-repo-cert
      containers:
      - name: project-builder-test
        image: virtuslab/scala-community-build-project-builder:test
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: mvn-repo-cert
          mountPath: /usr/local/share/ca-certificates/mvn-repo.crt
          subPath: mvn-repo.crt
          readOnly: true
        lifecycle:
          postStart:
            exec:
              command: ["update-ca-certificates"]
        command:
        - "bash"
        - "-c"
        - |
            (/build/build-revision.sh \
              https://github.com/dotty-staging/shapeless.git \
              shapeless-3-staging \
              3.0.1-RC1-bin-COMMUNITY-SNAPSHOT \
              3.0.0-M4 \
              "org.typelevel%shapeless3-deriving org.typelevel%shapeless3-data org.typelevel%shapeless3-test org.typelevel%shapeless3-typeable" \
              https://mvn-repo:8081/maven2/test \
              1.5.5 \
            && echo \
            && echo "Community project published successfully") || true
      restartPolicy: Never
  backoffLimit: 0
