Code Review
/
ci-management.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Reduce redundancy in ci-management docker jobs
[ci-management.git]
/
jjb
/
ci-management
/
ci-docker.yaml
diff --git
a/jjb/ci-management/ci-docker.yaml
b/jjb/ci-management/ci-docker.yaml
index
ad11597
..
1c2274d
100644
(file)
--- a/
jjb/ci-management/ci-docker.yaml
+++ b/
jjb/ci-management/ci-docker.yaml
@@
-1,69
+1,53
@@
---
---
+# Job configurations for base docker build images
+
+# This macro factors out common configuration
- ci_docker_common: &ci_docker_common
- ci_docker_common: &ci_docker_common
- # Defines common ci-docker configuration
name: ci-docker-common
# git repo
project: ci-management
name: ci-docker-common
# git repo
project: ci-management
- build-node: ubuntu1804-docker-4c-4g
- container-public-registry: nexus3.o-ran-sc.org:10001
- #
use the staging repo bcos all builds are RCs
- c
ontainer-push-registry: nexus3.o-ran-sc.org:10004
+ # maven settings file has docker credentials
+ mvn-settings: ci-management-settings
+ #
build every Saturday
+ c
ron: 'H H * * 6'
# use host network to clone from our gerrit
docker-build-args: '--network=host'
# 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
container-tag-method: yaml-file
- # build every Saturday
- cron: 'H H * * 6'
- # maven settings file has docker credentials
- mvn-settings: ci-management-settings
- stream:
- - master:
- branch: master
-
-- project:
- <<: *ci_docker_common
- name: bldr-alpine-python
+ # name key is overridden by project template
+ # Jenkins job prefix
project-name: '{project}-{name}'
project-name: '{project}-{name}'
+ # Docker image name
docker-name: '{name}'
docker-name: '{name}'
+ # Directory with Dockerfile
docker-root: 'docker/{name}'
docker-root: 'docker/{name}'
+ # Limit build trigger to appropriate files
gerrit_trigger_file_paths:
- compare-type: REG_EXP
pattern: 'docker/{name}/.*'
gerrit_trigger_file_paths:
- compare-type: REG_EXP
pattern: 'docker/{name}/.*'
+ # Includes verify and merge jobs
jobs:
- '{project-name}-gerrit-docker-jobs'
jobs:
- '{project-name}-gerrit-docker-jobs'
+ # Only build master branch
+ stream:
+ - master:
+ branch: master
+
+# Each project name is a subdirectory in ci-management/docker
+# with a Dockerfile and a container-tag.yaml file
- project:
- project:
+ name: bldr-alpine3
<<: *ci_docker_common
<<: *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}/.*'
- jobs:
- - '{project-name}-gerrit-docker-jobs'
- project:
- project:
+ name: bldr-alpine3-go
<<: *ci_docker_common
<<: *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}/.*'
- jobs:
- - '{project-name}-gerrit-docker-jobs'
- project:
- project:
+ name: bldr-ubuntu16-c-go
<<: *ci_docker_common
<<: *ci_docker_common
+
+- project:
name: bldr-ubuntu18-c-go
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}/.*'
- jobs:
- - '{project-name}-gerrit-docker-jobs'
+ <<: *ci_docker_common