Creating a Build Environment

A build environment is a Maven project that produces a Docker image from a set of templates. These are the files you need

pom.xml
Jenkinsfile
src
└── main
    └── kubernetes
        ├── anvil-jenkins
        │   └── config.yaml
        ├── practiv-build-nexus
        │   ├── persistent-volume-claim.yaml
        │   └── persistent-volume.yaml
        └── forge-build
            └── canary.yaml
environment.properties

Declare the project

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.practiv.stable.anvil</groupId>
    <artifactId>anvil-parent</artifactId>
    <version>${anvil-parent.version}</version>
  </parent>

  <groupId>io.practiv.stable.forge</groupId>
  <artifactId>forge-build</artifactId>
  <version>1.999-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>${project.artifactId}</name>
  <description>Build environment for Practiv</description>

  <properties>
    <environment>forge-build</environment>
    <environmentDomain>[continuousIntegrationDomain]</environmentDomain>
    <environmentScale>1</environmentScale>
    <branchoutGroups>forge anvil</branchoutGroups>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>io.repaint.maven</groupId>
        <artifactId>tiles-maven-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <tiles>
            <tile>io.practiv.stable.anvil:anvil-tile-build:[1,2)</tile>
            <tile>io.practiv.stable.anvil:anvil-tile-run:[1,2)</tile>
            <tile>io.practiv.stable.chalk:chalk-environment:[15,16)</tile>
            <tile>io.practiv.stable.run:practiv-run-oauth-proxy-ghe:[4,5)</tile>
          </tiles>
        </configuration>
      </plugin>

      <plugin>
        <groupId>net.stickycode.plugins</groupId>
        <artifactId>shifty-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>fetch-applications</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>fetch</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/resources/kubernetes</outputDirectory>
              <unpack>true</unpack>
              <artifacts>
                <artifact>io.practiv.stable.run:practiv-run-letsencrypt:[3,4):kubernetes-application:zip</artifact>
                <artifact>io.practiv.stable.build:practiv-build-nexus:[4,5):kubernetes-application:zip</artifact>
                <artifact>io.practiv.stable.anvil:anvil-jenkins:[4,5]:kubernetes-application:zip</artifact>
                <artifact>io.practiv.stable.documentation:practiv-documentation:[1,2]:kubernetes-application:zip</artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>

Jenkinsfile

buildImage()

Nexus

To deploy Nexus a disk is required, this is setup with a persistent volume and persistent volume claim

src/main/kubernetes/practiv-build-nexus/persistent-volume.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  labels:
    failure-domain.beta.kubernetes.io/zone: australia-southeast1-b__australia-southeast1-c
  name: ${environment}-nexus-data
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 100Gi
  gcePersistentDisk:
    pdName: ${environment}-nexus-data
    fsType: ext4
  storageClassName: practiv-fast-replicated

src/main/kubernetes/practiv-build-nexus/persistent-volume-claim.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nexus-data
  namespace: ${environment}
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  volumeName: ${environment}-nexus-data
  storageClassName: practiv-fast-replicated

jenkins config.yaml

Jenkins is the job execution workhorse, its needs little configuration in the form of a ConfigMap and a disk to store its state

nano “src/main/kubernetes/anvil-jenkins/config.yaml”


apiVersion: v1
data:
  application.yaml: |
    location: https://jenkins.build.forge.practiv.io
    namespace: forge-build
    github:
      url: https://git.practiv.io
      description: Practiv Source Control
      authorisation:
        adminUsers:
        - user1
        - user2
        organisations:
        - acme
    repositories:
      npm:
      maven: https://maven.build.forge.practiv.io/repository/practiv-maven
      mavenUpload: https://maven.build.forge.practiv.io/repository/practiv-maven-upload
      docker: docker.build.forge.practiv.io
      dockerUpload: docker-upload.build.forge.practiv.io
    organisation:
      id: Practiv
      name: Practiv
      groups:
      - forge
      - anvil
kind: ConfigMap
metadata:
  name: anvil-jenkins-config-v${anvil-jenkins.version}
  namespace: ${environment}

Set up the environment properties

The environment properties has the placeholders for all the the Kubernetes templates, the simplest way to find what’s missing is to run the build and let it fail

branchout-maven cv

snippet branchout-maven cv

snippet branchout-maven cv

UNRESOLVED CONFIGURATION FOUND in /charts/rocket-build/practiv-run-oauth-proxy/config.yaml
28-      ".build.acme.practiv.io"
29-    ]
30-
31-    http_address = "0.0.0.0:4180"
32-
33:    github_org="${githubOauthOrganisation}"

Then put the values in the environment properties file

environment.properties

githubOauthOrganisation=Practiv
githubOauthTeams=development,operators
githubUrl=https://git.practiv.io

Configure the load balancer

A namespace is much more useful if we can get to it, expose the namespace to the outside world using a Load Balancer pointing to the Ingress Controller

canary.yaml

nano “src/main/kubernetes/forge-build/canary.yaml”


apiVersion: v1
kind: Service
metadata:
  annotations:
    ${branchoutRunName}-status: canary
  name: ${branchoutRunName}-switch
  namespace: ${environment}
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
    name: http
  - port: 443
    protocol: TCP
    targetPort: 443
    name: https
  selector:
    app: nginx-ingress-controller
  sessionAffinity: None
  type: LoadBalancer
  loadBalancerIP: <static ip>

Build it

Building the project will prompt for the missing Secrets and Configurations

mvn -f pom.xml -s /home/malt/branchout/acme/maven/settings.xml --no-transfer-progress clean verifyy
[INFO] Scanning for projects...
[INFO] --- tiles-maven-plugin: Injecting 14 tiles as intermediary parent artifacts for io.practiv.acme.stable.rocket:rocket-build...
[INFO] Mixed 'io.practiv.acme.stable.rocket:rocket-build:12.999-SNAPSHOT' with tile 'io.practiv.acme.stable.anvil:anvil-tile-build:1.21' as its new parent.
[INFO] Mixed 'io.practiv.acme.stable.anvil:anvil-tile-build:1.21' with tile 'io.practiv.acme.stable.anvil:anvil-tile-run:1.5' as its new parent.
[INFO] Mixed 'io.practiv.acme.stable.anvil:anvil-tile-run:1.5' with tile 'io.practiv.stable.chalk:chalk-environment:16.2' as its new parent.
[INFO] Mixed 'io.practiv.stable.chalk:chalk-environment:16.2' with tile 'io.practiv.stable.run:practiv-run-notify-googlechat:4.1' as its new parent.
[INFO] Mixed 'io.practiv.stable.run:practiv-run-notify-googlechat:4.1' with tile 'io.practiv.stable.run:practiv-run-oauth-proxy-ghe:5.4' as its new parent.
[INFO] Mixed 'io.practiv.stable.run:practiv-run-oauth-proxy-ghe:5.4' with tile 'io.practiv.stable.tile:practiv-tile-buildinfo:2.19' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-buildinfo:2.19' with tile 'io.practiv.stable.tile:practiv-tile-colours:2.8' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-colours:2.8' with tile 'io.practiv.stable.tile:practiv-tile-kubernetes-environment:17.3' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-kubernetes-environment:17.3' with tile 'io.practiv.stable.tile:practiv-tile-kubernetes-run-platform-environment:2.3' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-kubernetes-run-platform-environment:2.3' with tile 'io.practiv.stable.tile:practiv-tile-quota-cpu-200to1200:1.4' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-quota-cpu-200to1200:1.4' with tile 'io.practiv.stable.tile:practiv-tile-quota-mem-128to2048:1.3' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-quota-mem-128to2048:1.3' with tile 'io.practiv.stable.tile:practiv-tile-quota-memory-java11:1.5' as its new parent.
[INFO] Mixed 'io.practiv.stable.tile:practiv-tile-quota-memory-java11:1.5' with tile 'io.practiv.stable.run:practiv-run-ingress:9.15' as its new parent.
[INFO] Mixed 'io.practiv.stable.run:practiv-run-ingress:9.15' with tile 'io.practiv.stable.run:practiv-run-scripts:15.12' as its new parent.
[INFO] Mixed 'io.practiv.stable.run:practiv-run-scripts:15.12' with original parent 'io.practiv.acme.stable.anvil:anvil-parent:2.1' as its new top level parent.
[INFO]
[INFO]
[INFO] -------------< io.practiv.acme.stable.rocket:rocket-build >-------------
[INFO] Building rocket-build 12.999-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rocket-build ---
[INFO] Deleting /home/malt/projects/acme/rocket/rocket-build/target
[INFO]
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__load-environment-properties) @ rocket-build ---
[INFO]
[INFO] --- echo-maven-plugin:0.4.0:echo (io.practiv.stable.tile_practiv-tile-kubernetes-run-platform-environment_2.3__show-tile-configuration) @ rocket-build ---
[INFO] tile-kubernetes.runPlatform.templates: io.practiv.stable.tile:practiv-tile-kubernetes-run-platform-environment
[INFO] tile-kubernetes.runPlatform.versionRange: [2.3]
[INFO] tile-kubernetes.runPlatform.keelPolicy: minor
[INFO] tile-kubernetes.runPlatform.systemEmail: systems@practiv.com
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__require-registry-configuration) @ rocket-build ---
[INFO]
[INFO] --- bounds-maven-plugin:4.6:current-version (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__get-environment-versions) @ rocket-build ---
[INFO] resolved io.practiv.stable.basalt:basalt-kubectl:jar:[2,3) to 2.5
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:parse-version (io.practiv.stable.tile_practiv-tile-buildinfo_2.19__get-major-version) @ rocket-build ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:regex-properties (io.practiv.stable.tile_practiv-tile-buildinfo_2.19__regex-properties) @ rocket-build ---
[INFO]
[INFO] --- echo-maven-plugin:0.4.0:echo (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__show-tile-configuration) @ rocket-build ---
[INFO] default:
[INFO] environmentColour: \e[0m
[INFO] tile-deploy.image.name: docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT
[INFO] tile-baseImage: kubectl
[INFO] tile-baseImage.versionRange: [2,3)
[INFO] tile-fabric8.version: 0.33.0
[INFO] environmentSwitch: rocket-build
[INFO] darkEnvironment: rocket-build
[INFO] environmentScale: 1
[INFO] tile-deploy.validationPrefix: %z
[INFO] required:
[INFO] environmentDockerRegistry: docker.build.acme.practiv.io
[INFO] globalDockerRegistry: docker.build.forge.practiv.io
[INFO] environment: rocket-build
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.run_practiv-run-scripts_15.12__get-practiv-run-scripts-kubernetes) @ rocket-build ---
[INFO] resolved io.practiv.stable.run:practiv-run-scripts:zip:kubernetes-application:[15.12] to 15.12
[INFO] downloading io.practiv.stable.run:practiv-run-scripts:zip:kubernetes-application:15.12 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.run_practiv-run-ingress_9.15__get-practiv-run-ingress-kubernetes) @ rocket-build ---
[INFO] resolved io.practiv.stable.run:practiv-run-ingress:zip:kubernetes-application:[9.15] to 9.15
[INFO] downloading io.practiv.stable.run:practiv-run-ingress:zip:kubernetes-application:9.15 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.tile_practiv-tile-kubernetes-run-platform-environment_2.3__get-run-platform-templates) @ rocket-build ---
[INFO] resolved io.practiv.stable.tile:practiv-tile-kubernetes-run-platform-environment:zip:run-platform-template:[2.3] to 2.3
[INFO] downloading io.practiv.stable.tile:practiv-tile-kubernetes-run-platform-environment:zip:run-platform-template:2.3 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/run-platform
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__get-kubernetes-templates) @ rocket-build ---
[INFO] resolved io.practiv.stable.tile:practiv-tile-kubernetes-environment:zip:kubernetes-templates:[17.3] to 17.3
[INFO] downloading io.practiv.stable.tile:practiv-tile-kubernetes-environment:zip:kubernetes-templates:17.3 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes/rocket
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.run_practiv-run-oauth-proxy-ghe_5.4__get-practiv-run-oauth-proxy-ghe-kubernetes) @ rocket-build ---
[INFO] resolved io.practiv.stable.run:practiv-run-oauth-proxy-ghe:zip:kubernetes-aggregate:[5.4] to 5.4
[INFO] downloading io.practiv.stable.run:practiv-run-oauth-proxy-ghe:zip:kubernetes-aggregate:5.4 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.run_practiv-run-notify-googlechat_4.1__get-practiv-run-notify-googlechat-kubernetes) @ rocket-build ---
[INFO] resolved io.practiv.stable.run:practiv-run-notify-googlechat:zip:kubernetes-application:[4.1] to 4.1
[INFO] downloading io.practiv.stable.run:practiv-run-notify-googlechat:zip:kubernetes-application:4.1 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (io.practiv.stable.run_practiv-run-notify-googlechat_4.1__get-practiv-run-notify-googlechat-run-platform) @ rocket-build ---
[INFO] resolved io.practiv.stable.run:practiv-run-notify-googlechat:zip:run-platform-template:[4.1] to 4.1
[INFO] downloading io.practiv.stable.run:practiv-run-notify-googlechat:zip:run-platform-template:4.1 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/run-platform
[INFO]
[INFO] --- shifty-maven-plugin:1.8:fetch (fetch-applications) @ rocket-build ---
[INFO] resolved io.practiv.acme.stable.anvil:anvil-jenkins:zip:kubernetes-application:[7,8) to 7.4
[INFO] downloading io.practiv.acme.stable.anvil:anvil-jenkins:zip:kubernetes-application:7.4 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO] resolved io.practiv.stable.run:practiv-run-echo:zip:kubernetes-application:[1,2) to 1.8
[INFO] resolved io.practiv.stable.clay:clay-mysql-mariadb:zip:kubernetes-application:[1,2) to 1.16
[INFO] resolved io.practiv.stable.build:practiv-build-nexus:zip:kubernetes-application:[4,5) to 4.6
[INFO] downloading io.practiv.stable.clay:clay-mysql-mariadb:zip:kubernetes-application:1.16 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO] downloading io.practiv.stable.run:practiv-run-echo:zip:kubernetes-application:1.8 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO] downloading io.practiv.stable.build:practiv-build-nexus:zip:kubernetes-application:4.6 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO] resolved io.practiv.stable.run:practiv-run-letsencrypt:zip:kubernetes-application:[3,4) to 3.2
[INFO] downloading io.practiv.stable.run:practiv-run-letsencrypt:zip:kubernetes-application:3.2 to folder /home/malt/projects/acme/rocket/rocket-build/target/resources/kubernetes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ rocket-build ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/malt/projects/acme/rocket/rocket-build/src/main/resources
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__copy-docker-resources) @ rocket-build ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/malt/projects/acme/rocket/rocket-build/src/main/resources
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__copy-kubernetes-resources) @ rocket-build ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 120 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rocket-build ---
[INFO] No sources to compile
[INFO]
[INFO] --- yamllint-maven-plugin:0.1b:yamllint (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__yamllint) @ rocket-build ---
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/rocket-build/canary.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/anvil-jenkins/persistent-volume-claim.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/anvil-jenkins/config.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/anvil-jenkins/persistent-volume.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/practiv-build-nexus/persistent-volume-claim.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/src/main/kubernetes/practiv-build-nexus/persistent-volume.yaml: OK
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ rocket-build ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/malt/projects/acme/rocket/rocket-build/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ rocket-build ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rocket-build ---
[INFO] No tests to run.
[INFO]
[INFO] --- yamllint-maven-plugin:0.1b:yamllint (io.practiv.stable.tile_practiv-tile-kubernetes-run-platform-environment_2.3__run-platform-yamllint) @ rocket-build ---
[INFO]  /home/malt/projects/acme/rocket/rocket-build/target/resources/run-platform/config.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/target/resources/run-platform/versions.yaml: OK
[INFO]  /home/malt/projects/acme/rocket/rocket-build/target/resources/run-platform/stateful-set.yaml: OK
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ rocket-build ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/malt/projects/acme/rocket/rocket-build/target/rocket-build-12.999-SNAPSHOT.jar
[INFO]
[INFO] --- docker-maven-plugin:0.33.0:build (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__build-docker-image) @ rocket-build ---
[INFO] Copying files to /home/malt/projects/acme/rocket/rocket-build/target/docker/docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build/12.999-SNAPSHOT/build/maven
[INFO] Building tar: /home/malt/projects/acme/rocket/rocket-build/target/docker/docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build/12.999-SNAPSHOT/tmp/docker-build.tar
[INFO] DOCKER> [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Created docker-build.tar in 377 milliseconds
[INFO] DOCKER> Step 1/7 : FROM docker.build.acme.practiv.io/io.practiv/basalt/basalt-kubectl:2.5
[INFO] DOCKER>
[INFO] DOCKER> ---> e118061b80c5
[INFO] DOCKER> Step 2/7 : ENV PATH=/charts/rocket-build/bin:$PATH PS1="\\n\\u at \\e[0m$(version)\\e[0m \\w\\n#\\040"
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> 9946811d6716
[INFO] DOCKER> Step 3/7 : COPY maven /
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> b47e8bb21a2a
[INFO] DOCKER> Step 4/7 : WORKDIR /charts
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> 4a4f4e1589cf
[INFO] DOCKER> Step 5/7 : RUN chmod 0755 /charts/rocket-build/bin/*
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> b03d85124746
[INFO] DOCKER> Step 6/7 : RUN configure-cksum
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> f96679d2665b
[INFO] DOCKER> Step 7/7 : USER kubectl
[INFO] DOCKER>
[INFO] DOCKER> ---> Using cache
[INFO] DOCKER> ---> 68ac30edcb0d
[INFO] DOCKER> Successfully built 68ac30edcb0d
[INFO] DOCKER> Successfully tagged docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT
[INFO] DOCKER> [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Built image sha256:68ac3
[INFO]
[INFO] --- maven-assembly-plugin:3.1.1:single (io.practiv.stable.tile_practiv-tile-kubernetes-run-platform-environment_2.3__collate-run-platform-templates) @ rocket-build ---
[INFO] Building zip: /home/malt/projects/acme/rocket/rocket-build/target/rocket-build-12.999-SNAPSHOT-run-platform.zip
[INFO]
[INFO] --- docker-maven-plugin:0.33.0:start (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__validate-configuration) @ rocket-build ---
[INFO] DOCKER> [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Start container 3289fc318415
All the Kubernetes manifests are fully resolved, that is to say that there are no placeholders left.
Use this command to validate the passphrase for all the values
  echo "passphrase: "; read -s -r passphrase; test -n "${passphrase}" || exit 77;  find src/main/secrets/values  -name "*sha256.aes256" | while read -r each; do printf "${each}: "; openssl enc -md sha256 -aes-256-cbc -pbkdf2 -d -base64 -k "${passphrase}" -in "${each}" --out /dev/null 2>/dev/null || printf "NOT"; echo " OK"; done; unset passphrase
checking /charts/rocket-build/practiv-run-oauth-proxy/secret.template
checking /charts/rocket-build/anvil-jenkins/dust-startup/secret-ArtifactRepositoryRead.template
checking /charts/rocket-build/anvil-jenkins/dust-startup/secret-ArtifactRepositoryWrite.template
checking /charts/rocket-build/anvil-jenkins/dust-startup/secret-SourceControlWebhook.template
checking /charts/rocket-build/anvil-jenkins/dust-startup/secret-SourceControlWrite.template
checking /charts/rocket-build/anvil-jenkins/dust-startup/secret-SourceControlRead.template
checking /charts/rocket-build/anvil-jenkins/dust-notify-google-chat/secret-GoogleChat.template
checking /charts/rocket-build/anvil-jenkins/secret.template
checking /charts/rocket-build/anvil-jenkins/dust-maven-scripted/secret-SourceControlWrite.template
checking /charts/rocket-build/anvil-jenkins/dust-legacy-scripted/secret-SourceControlWrite.template
checking /charts/rocket-build/rocket/secret-environmentDockerRegistry.template
PLACEHOLDER 'docker.build.acme.practiv.io/readAuthBase64' in /charts/rocket-build/rocket/secret-environmentDockerRegistry.template has NO VALUE, use this command to create the encrypted value:
  openssl enc -md sha256 -aes-256-cbc -pbkdf2 -base64 -out src/main/secrets/values/docker.build.acme.practiv.io/readAuthBase64.sha256.aes256 -in src/main/secrets/values/docker.build.acme.practiv.io/readAuthBase64.raw
There are issues with the Kubernetes secret templates of the environment, resolve the errors above to continue. To DECODE other secrets do
  openssl enc -md sha256 -aes-256-cbc -pbkdf2 -d -base64 -in src/main/secrets/values/<placeholder>.sha256.aes256
  openssl enc -md md5 -aes-256-cbc -pbkdf2 -d -base64 -in src/main/secrets/values/<placeholder>.md5.aes256
To encrypt all the secrets you can run this command:
  echo "passphrase: "; read -s -r passphrase; test -n "${passphrase}" || exit 77; echo "For each secret paste value then Ctrl-d three times"; for each in "docker.build.acme.practiv.io/readAuthBase64" ; do echo; echo "${each}: "; openssl enc -md sha256 -aes-256-cbc -pbkdf2 -base64 -k "${passphrase}" -out "src/main/secrets/values/${each}.sha256.aes256"; done; unset passphrase
[ERROR] DOCKER> [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Container stopped with exit code 77 unexpectedly after 522 ms while waiting on exit code 0
[ERROR] DOCKER> Error occurred during container startup, shutting down...
[INFO] DOCKER> [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Stop and removed container 3289fc318415 after 0 ms
[ERROR] DOCKER> I/O Error [[docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Container stopped with exit code 77 unexpectedly after 522 ms while waiting on exit code 0]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.649 s
[INFO] Finished at: 2020-09-03T21:47:19+12:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.33.0:start (io.practiv.stable.tile_practiv-tile-kubernetes-environment_17.3__validate-configuration) on project rocket-build: I/O Error: [docker-upload.build.acme.practiv.io/io.practiv.acme/rocket/rocket-build:12.999-SNAPSHOT] "rocket-build": Container stopped with exit code 77 unexpectedly after 522 ms while waiting on exit code 0 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles: