Files
drone-kaniko/.drone.yml
naumso 411aeefb8b
Some checks failed
continuous-integration/drone/push Build encountered an error
Update .drone.yml
2025-06-26 21:27:16 +03:00

99 lines
1.7 KiB
YAML

---
kind: pipeline
type: kubernetes
#type: docker
clone:
#disable: true
depth: 1
name: deploy develop and staging
platform:
os: linux
arch: amd64
trigger:
branch:
- master
event:
- push
steps:
- name: build test image
image: harbor.1sept.ru/drone/drone-kaniko
settings:
registry: harbor.1sept.ru
repo: drone/drone-kaniko
cache: false
tags:
- git-${DRONE_COMMIT_SHA:0:7}
- drone-${DRONE_BUILD_NUMBER}
username:
from_secret: harbor-username
password:
from_secret: harbor-password
- name: test image
image: harbor.1sept.ru/drone/drone-kaniko:git-${DRONE_COMMIT_SHA:0:7}
settings:
registry: harbor.1sept.ru
repo: drone/drone-kaniko
cache: false
tags:
- test
username:
from_secret: harbor-username
password:
from_secret: harbor-password
---
kind: pipeline
name: promote production
type: kubernetes
clone:
# disable: true
depth: 1
trigger:
branch:
- main
event:
- promote
target:
- production
steps:
- name: build image
image: harbor.1sept.ru/drone/drone-kaniko:git-${DRONE_COMMIT_SHA:0:7}
settings:
registry: harbor.1sept.ru
repo: drone/drone-kaniko
cache: false
tags:
- git-${DRONE_COMMIT_SHA:0:7}
- drone-${DRONE_BUILD_NUMBER}
- latest
username:
from_secret: harbor-username
password:
from_secret: harbor-password
image_pull_secrets:
- dockerconfig
# Такая кнопка нужна
# POST /api/repos/{owner}/{repo}/builds/{build}/promote?target={target}
#
# Read more: https://docs.drone.io/api/builds/build_promote/
---
kind: signature
hmac: 768919cfb45c131aae70e3091b96b6e2b75edfb0a0c019792f59da89d124991d
...