Refactor!: Update JJB code to comply with 5.x
[ci-management.git] / jjb / ci-management / ci-docker.yaml
index 0bf7626..7aa82c9 100644 (file)
@@ -1,6 +1,8 @@
 ---
-- ci_docker_common: &ci_docker_common
-    # Defines common ci-docker configuration
+# Job configurations for base docker build images
+
+# This macro factors out common configuration
+- _ci_docker_common: &ci_docker_common
     name: ci-docker-common
     # git repo
     project: ci-management
     cron: 'H H * * 6'
     # use host network to clone from our gerrit
     docker-build-args: '--network=host'
-    # default to YAML
+    # get tag from YAML
     container-tag-method: yaml-file
-    jobs:
-      - '{project-name}-gerrit-docker-jobs'
-    stream:
-      - master:
-          branch: master
-
-- project:
-    <<: *ci_docker_common
-    name: bldr-alpine3
+    # name key is overridden by project template
+    # Jenkins job prefix
     project-name: '{project}-{name}'
+    # Docker image name
     docker-name: '{name}'
+    # Directory with Dockerfile
     docker-root: 'docker/{name}'
+    # Limit build trigger to appropriate files
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
         pattern: 'docker/{name}/.*'
+    # Includes verify and merge jobs
     jobs:
       - '{project-name}-gerrit-docker-jobs'
+    # Only build master branch
+    stream:
+      - master:
+          branch: master
 
-- project:
-    <<: *ci_docker_common
-    name: bldr-debian-python
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'
+# Each project name is a subdirectory in ci-management/docker
+# with a Dockerfile and a container-tag.yaml file
 
+# This image is deprecated, projects should move to Ubuntu 18
+# TODO remove entirely
 - project:
-    <<: *ci_docker_common
     name: bldr-ubuntu16-c-go
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'
-
-- project:
     <<: *ci_docker_common
-    name: bldr-ubuntu18-c-go
-    project-name: '{project}-{name}'
-    docker-name: '{name}'
-    docker-root: 'docker/{name}'
-    gerrit_trigger_file_paths:
-      - compare-type: REG_EXP
-        pattern: 'docker/{name}/.*'