vm-import-controller/.drone.yml
Gaurav Mehta 6ef0eaeb3d introduction of gh actions for codeql and trivy
updated dapper image

updated package addition
2023-03-08 08:58:48 +08:00

73 lines
1.3 KiB
YAML

---
kind: pipeline
name: harvester-vm-import-controller
platform:
os: linux
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag
- name: build
image: rancher/dapper:v0.6.0
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock
- name: docker-publish-master
image: plugins/docker
settings:
build_args:
- VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-vm-import-controller"
tag: ${DRONE_BRANCH}-head
username:
from_secret: docker_username
when:
branch: main
event:
- push
- name: docker-publish
image: plugins/docker
settings:
build_args:
- "VERSION=${DRONE_TAG}"
custom_dns: 1.1.1.1
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-vm-import-controller"
tag: "${DRONE_TAG}"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/main
- refs/tags/*
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock