218 lines
4.9 KiB
YAML
218 lines
4.9 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: product
|
|
|
|
workspace:
|
|
path: /service
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: version
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/version:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
- name: autotag
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/autotag:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
- name: chart
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/chart:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
git_repository:
|
|
name_space: bibi-service
|
|
replicas: 3
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
service_name: user
|
|
service_port: 80
|
|
service_type: ClusterIP
|
|
service_account_name: bibi
|
|
stage: product
|
|
- name: build
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/golang:1.15.3-alpine3.12-ur
|
|
pull: always
|
|
privileged: true
|
|
volumes:
|
|
- name: go
|
|
path: /go
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
commands:
|
|
- go mod tidy
|
|
- go build -o ./pack/service main.go
|
|
- name: docker
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/docker:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
service_name: user
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
- name: k8s
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/helm:1.0.0-product
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
commands:
|
|
- helm template chart | kubectl apply -f -
|
|
|
|
image_pull_secrets:
|
|
- docker_config_json
|
|
|
|
volumes:
|
|
- name: go
|
|
host:
|
|
path: /go
|
|
- name: docker_sock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
- name: timezone
|
|
host:
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
host:
|
|
path: /etc/localtime
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: test
|
|
|
|
workspace:
|
|
path: /service
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch:
|
|
- develop
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: version
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/version:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
- name: autotag
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/autotag:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
- name: chart
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/chart:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
git_repository:
|
|
name_space: bibi-service
|
|
replicas: 3
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
service_name: user
|
|
service_port: 80
|
|
service_type: ClusterIP
|
|
service_account_name: bibi
|
|
stage: test
|
|
- name: build
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/golang:1.15.3-alpine3.12-ur
|
|
pull: always
|
|
privileged: true
|
|
volumes:
|
|
- name: go
|
|
path: /go
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
commands:
|
|
- go mod tidy
|
|
- go build -o ./pack/service main.go
|
|
- name: docker
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/docker:v1.0.0
|
|
pull: always
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
settings:
|
|
service_name: user
|
|
image_repository: registry.eu-central-1.aliyuncs.com/bibiservice/user
|
|
- name: k8s
|
|
image: registry.eu-central-1.aliyuncs.com/bibiservice/helm:1.0.0-test
|
|
pull: always
|
|
volumes:
|
|
- name: timezone
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
path: /etc/localtime
|
|
commands:
|
|
- helm template chart | kubectl apply -f -
|
|
|
|
image_pull_secrets:
|
|
- docker_config_json
|
|
|
|
volumes:
|
|
- name: go
|
|
host:
|
|
path: /go
|
|
- name: docker_sock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
- name: timezone
|
|
host:
|
|
path: /etc/timezone
|
|
- name: localtime
|
|
host:
|
|
path: /etc/localtime |