74 lines
1.5 KiB
YAML
74 lines
1.5 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build-by-tag
|
|
|
|
node:
|
|
name: pve
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
ref:
|
|
- refs/tags/v*
|
|
|
|
steps:
|
|
- name: build-and-push-normal
|
|
image: plugins/docker
|
|
settings:
|
|
registry: harbor.seahi.me
|
|
repo: harbor.seahi.me/stu/versions-for-swarm
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
insecure: true
|
|
tags:
|
|
- ${DRONE_TAG}
|
|
build_args:
|
|
- APP_VERSION=${DRONE_TAG}
|
|
auto_tag: false
|
|
when:
|
|
ref:
|
|
exclude:
|
|
- refs/tags/*buggy*
|
|
|
|
- name: build-and-push-buggy
|
|
image: plugins/docker
|
|
settings:
|
|
registry: harbor.seahi.me
|
|
repo: harbor.seahi.me/stu/versions-for-swarm
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
insecure: true
|
|
tags:
|
|
- ${DRONE_TAG}
|
|
build_args:
|
|
- APP_VERSION=${DRONE_TAG}
|
|
- BUGGY=true
|
|
auto_tag: false
|
|
when:
|
|
ref:
|
|
include:
|
|
- refs/tags/*buggy*
|
|
|
|
- name: tag-latest-if-v2.1
|
|
image: plugins/docker
|
|
settings:
|
|
registry: harbor.seahi.me
|
|
repo: harbor.seahi.me/stu/versions-for-swarm
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
insecure: true
|
|
tags:
|
|
- latest
|
|
build_args:
|
|
- APP_VERSION=${DRONE_TAG}
|
|
auto_tag: false
|
|
when:
|
|
ref:
|
|
- refs/tags/v2.1
|