Commit 6f7f2ab2 authored by leitao.zhang's avatar leitao.zhang

build

parent 71b00915
workspace:
path: src/gitlab.wodcloud.com/apaas/apaas-meshproxy
clone:
git:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git-arm64:1.0
dns: 223.5.5.5
pipeline:
go:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-go-arm64:1.13.12-stretch
dns: 223.5.5.5
environment:
- GOPROXY=https://goproxy.cn,direct
main: src
binary: proxy
volumes:
- /data/cache/gopath/pkg:/drone/pkg
docker-dev:
dns: 223.5.5.5
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/debian-arm64:buster-slim
repo: wod/apaas-meshproxy-arm64
dockerfile: build/arm.dockerfile
version: "v3.0.0"
channel: alpha
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: [dev]
docker-master:
dns: 223.5.5.5
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/busybox-arm64:1.32.0-glibc
repo: wod/apaas-meshproxy-arm64
dockerfile: build/arm.dockerfile
version: "v3.0.0"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: [master]
platform: 10.11.92.34
workspace: workspace:
base: /go
path: src/gitlab.wodcloud.com/apaas/apaas-meshproxy path: src/gitlab.wodcloud.com/apaas/apaas-meshproxy
clone: clone:
git: git:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0
pull: true
dns: 223.5.5.5 dns: 223.5.5.5
when:
branch:
- dev
pipeline: pipeline:
go: build-go: # dev环境build 一个
image: registry.cn-qingdao.aliyuncs.com/wod/devops-go:1.14.4-stretch image: registry.cn-qingdao.aliyuncs.com/wod/devops-go-arch:1.15.6-alpine
binary: apaas-meshproxy
dns: 223.5.5.5 dns: 223.5.5.5
main: src
environment: environment:
- GOPROXY=https://goproxy.cn,direct - GOPROXY=https://goproxy.cn,direct
main: src
binary: proxy
volumes: volumes:
- /data/cache/gopath/pkg:/drone/pkg - /data/cache/go/pkg:/go/pkg
docker-dev: when:
dns: 223.5.5.5 branch:
- dev
docker: # 封装二进制到docker
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.8 base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12
dockerfile: build/dockerfile
repo: wod/apaas-meshproxy repo: wod/apaas-meshproxy
version: v3.0.0 version: v3.0.0
channel: alpha channel: alpha
args: "TARGETOS=linux,TARGETARCH=amd64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -30,15 +40,52 @@ pipeline: ...@@ -30,15 +40,52 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN - source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD target: REGISTRY_PASSWORD
when: when:
branch: [ dev ] branch:
docker-master: - dev
harbor: # master上直接改 dev build docker镜像的tag 这就要求必须先完成dev
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5 dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
harbor-release:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
docker-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
dns: 223.5.5.5
pull: true
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.8 base: registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12-arm64
dockerfile: build/dockerfile
repo: wod/apaas-meshproxy repo: wod/apaas-meshproxy
version: "v3.0.0" version: "v3.0.0"
channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -46,15 +93,31 @@ pipeline: ...@@ -46,15 +93,31 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN - source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD target: REGISTRY_PASSWORD
when: when:
branch: [ master ] branch:
docker-release: - dev
harbor-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5 dns: 223.5.5.5
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.8 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0-alpha-arm64
repo: wod/apaas-meshproxy target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0-arm64
version: "v3.0" registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
harbor-release-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.0-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
secrets: secrets:
- source: REGISTRY_USER_ALIYUN - source: REGISTRY_USER_ALIYUN
...@@ -62,4 +125,6 @@ pipeline: ...@@ -62,4 +125,6 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN - source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD target: REGISTRY_PASSWORD
when: when:
branch: [ master ] branch:
\ No newline at end of file - master
\ No newline at end of file
FROM {{ BASEIMAGE }}
MAINTAINER {{ AUTHOR }}
LABEL Author={{ AUTHOR }} Name={{ PROJECT }} Version={{ VERSION }}
COPY ./dist/. /app
EXPOSE 80
ENTRYPOINT ["/app/proxy", "--port=80","--prefix=/bgmesh/fiddler"]
FROM {{ BASEIMAGE }} ARG BASE
MAINTAINER {{ AUTHOR }}
LABEL Author={{ AUTHOR }} Name={{ PROJECT }} Version={{ VERSION }} FROM $BASE
COPY ./dist/. /app
ARG AUTHOR
ARG VERSION
LABEL maintainer=${AUTHOR} version=${VERSION}
ARG TARGETOS
ARG TARGETARCH
COPY ./dist/apaas-meshproxy-$TARGETOS-$TARGETARCH /app/apaas-meshproxy
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["/app/proxy", "--port=80","--prefix=/bgmesh/fiddler"] ENTRYPOINT ["/app/apaas-meshproxy", "--port=80", "--prefix=/bgmesh/fiddler"]
...@@ -3,6 +3,7 @@ module gitlab.wodcloud.com/apaas/apaas-meshproxy ...@@ -3,6 +3,7 @@ module gitlab.wodcloud.com/apaas/apaas-meshproxy
go 1.12 go 1.12
require ( require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/Chain-Zhang/pinyin v0.1.3 github.com/Chain-Zhang/pinyin v0.1.3
github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 // indirect github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
...@@ -12,24 +13,24 @@ require ( ...@@ -12,24 +13,24 @@ require (
github.com/bndr/gotabulate v1.1.2 // indirect github.com/bndr/gotabulate v1.1.2 // indirect
github.com/clbanning/mxj v1.8.4 // indirect github.com/clbanning/mxj v1.8.4 // indirect
github.com/fatih/structs v1.1.0 // indirect github.com/fatih/structs v1.1.0 // indirect
github.com/gin-gonic/contrib v0.0.0-20190923054218-35076c1b2bea github.com/gin-gonic/contrib v0.0.0-20201101042839-6a891bf89f19
github.com/gin-gonic/gin v1.4.0 github.com/gin-gonic/gin v1.6.3
github.com/go-redis/redis v6.15.6+incompatible github.com/go-redis/redis v6.15.9+incompatible
github.com/go-sql-driver/mysql v1.5.0 github.com/go-sql-driver/mysql v1.6.0
github.com/lib/pq v1.4.0 github.com/lib/pq v1.10.0
github.com/mattn/go-isatty v0.0.8 // indirect github.com/mattn/go-sqlite3 v1.14.6 // indirect
github.com/natefinch/lumberjack v2.0.0+incompatible github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/onsi/ginkgo v1.10.2 // indirect github.com/onsi/ginkgo v1.16.1 // indirect
github.com/onsi/gomega v1.7.0 // indirect github.com/onsi/gomega v1.11.0 // indirect
github.com/sirupsen/logrus v1.4.2 github.com/sirupsen/logrus v1.8.1
github.com/spf13/cast v1.3.1 github.com/spf13/cast v1.3.1
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tealeg/xlsx v1.0.5 // indirect github.com/tealeg/xlsx v1.0.5 // indirect
github.com/vulcand/oxy v1.0.0 github.com/vulcand/oxy v1.2.0
github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be // indirect github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be // indirect
github.com/xormplus/core v0.0.0-20200308074340-f3bce19d5f31 github.com/xormplus/core v0.0.0-20200308074340-f3bce19d5f31
github.com/xormplus/xorm v0.0.0-20200410045938-f6b4c1cd3b8b github.com/xormplus/xorm v0.0.0-20210107091022-175d736afaae
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
xorm.io/cmd v0.0.0-20200427014343-9ccdb0ebedf7 // indirect
) )
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment