diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6c3b1ee --- /dev/null +++ b/.drone.yml @@ -0,0 +1,80 @@ +--- +kind: pipeline +type: kubernetes + +#type: docker + +clone: + #disable: true + depth: 1 + +name: deploy develop and staging + +platform: + os: linux + arch: amd64 + +trigger: + branch: + - main + event: + - push + +steps: + +- name: pre build 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} + - 1.23.2-debug + username: + from_secret: harbor-username + password: + from_secret: harbor-password + +- name: test image + image: harbor.1sept.ru/drone/drone-kaniko:1.23.2-debug + settings: + registry: harbor.1sept.ru + repo: drone/drone-kaniko + cache: false + tags: + - test + username: + from_secret: harbor-username + password: + from_secret: harbor-password + +- name: build 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} + - 1.23.2-debug + - 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: 6ce8ba7f385faf4da1d9a90ddac4ea59d61e2f84a560cbc9d1429e5c1b519a2e + +... diff --git a/Dockerfile b/Dockerfile index 6109cd7..87ab177 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/kaniko-project/executor:v1.20.0-debug +FROM gcr.io/kaniko-project/executor:v1.23.2-debug ENV HOME /root ENV USER root diff --git a/README.md b/README.md index bdc6096..defbd19 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ docker build -t 1sept/drone-kaniko . ```bash -docker buildx build --no-cache --platform linux/amd64 --push -t 1sept/drone-kaniko:latest -t 1sept/drone-kaniko:v1.20.0-debug . -t harbor.1sept.ru/drone/drone-kaniko:latest -t harbor.1sept.ru/drone/drone-kaniko:v1.20.0-debug +docker buildx build --no-cache --platform linux/amd64 --push -t 1sept/drone-kaniko:latest . -t harbor.1sept.ru/drone/drone-kaniko:latest -t harbor.1sept.ru/drone/drone-kaniko:v1.23.2-debug ```