- CI Pipeline exists in forked branches.
- CD pipeline exists in remote master branch.
- Review app is used to review merge request.
- Topic branch is forked local branch which developer works on.
- After CI pipeline runs successfully, developer can raise a merge request to remote branch(master).
- Ops review dockerfile and changes in this merge, considering merge to master or discard.
- build centos mini from scratch
- build your own dtr or harbor.
- replace all
dtr.example.com
toyou own dtr/harbor url
in the Dockerfile - build your own
http server
to store necessary packages, nginx or apache is recommended. - pre-download
yum repo
,consul
,consul-template
,awscli
,gosu
,dump-init
packages stores instep 4 http server
. The specific path you can refer to Dockerfile mentioned part. - replace all
repo.example.com
toyou own http server
. - build you own consul and vaulthttps://www.vaultproject.io/.
- Fork this project.
- Develop and amend in your own
master
branch. - Update your env in
makefile.d/config
. - Raise a
merge request
to original project.
- source code branch name
BUILD_SOURCE_BRANCH=rel
- project version
BUILD_PROJECT_VERSION=1
- source code revision number
BUILD_SOURCE_REVISION=0
- job build number
BUILD_JOB_NUMBER=0
- build image name
# format: deploy_target=os-type-name-version
# e.g:
deploy_target=centos-buildenv-apm-18
BUILD_SOURCE_BRANCH?=rel # source code branch name
BUILD_PROJECT_VERSION?=1 # project version
BUILD_SOURCE_REVISION?=0 # source code revision number
BUILD_JOB_NUMBER?=0 # job build number
containers:
- OS: os = (centos/busybox/ubuntu)
- package type: type = (base/buildenv/product/tools)
- package name: name = (base/java/jetty/nginx/node)
- package version: version = (1.8.0/9.2.14)
- image version: image version = (rel.1.0) # define in makefile.d/config
- Dockerfile Dockerfile
i. command
make <target> [os=centos] type=base name=node [version=9.2.14]
i. parameters
- target(required):
- build
- release
- clean
- os(optional):
- centos(default)
- busybox
- ubuntu
- type(required):
- base
- buildenv
- product
- tools
- name(required):
- base
- jetty
- node
- version(optional):
- 9.2.14(default is latest version)
- Modify dtr url, dtr auth in Makefile.
- You should build
docker_lint
first which is intools/dockerfile_lint
. - You should download
docker bench
image from official and upload to your own dtr. - Modify Consul Host in
Makefile
and Consul/Vault Host/Token incentos/base.base/19/rel.1.0/resource/config/apps/supervisord.hcl
- Other information please check
base/base/19/rel.1.0/README.md
make build os=centos type=base name=base version=19
# this will generate an image named like: dtr.example.com/base/base19:rel.1.0.0 locally