Files
drone-helm3/.drone.yml
naumso 82ed33b180
All checks were successful
continuous-integration/drone/push Build is passing
Update .drone.yml
2024-02-20 19:46:38 +03:00

84 lines
1.9 KiB
YAML

kind: pipeline
type: kubernetes
name: build
trigger:
branch:
- master
clone:
# disable: true
depth: 1
image_pull_secrets:
- dockerconfig
volumes:
- name: cache
host:
path: /mnt/kub.drone
- name: gocache
host:
path: /mnt/kub.drone/${DRONE_REPO}/gocache
- name: golangcilintcache
host:
path: /mnt/kub.drone/${DRONE_REPO}/golangcilintcache
steps:
- name: prepare cache
image: harbor.1sept.ru/docker/library/busybox
commands:
- mkdir -p /cache/${DRONE_REPO}/gocache
- mkdir -p /cache/${DRONE_REPO}/golangcilintcache
volumes:
- name: cache
path: /cache
# - name: test
# image: golangci/golangci-lint:v1.48.0
# environment:
# GOCACHE: /drone/src/gocache
# GOLANGCI_LINT_CACHE: /drone/src/golangcilintcache
# commands:
# - go mod download
# - make test
# volumes:
# - name: gocache
# path: /drone/src/gocache
# - name: golangcilintcache
# path: /drone/src/golangcilintcache
# resources:
# limits:
# memory: 3GiB
# - name: build
# image: golang:1.19
# environment:
# GOCACHE: /drone/src/gocache
# GOLANGCI_LINT_CACHE: /drone/src/golangcilintcache
# commands:
# - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/drone-helm cmd/drone-helm/main.go
# volumes:
# - name: gocache
# path: /drone/src/gocache
# - name: golangcilintcache
# path: /drone/src/golangcilintcache
- name: publish_linux_amd64
image: harbor.1sept.ru/drone/drone-kaniko
settings:
registry: harbor.1sept.ru
repo: drone/drone-helm3
cache: true
tags:
- git-${DRONE_COMMIT_SHA:0:7}
- latest
username:
from_secret: harbor-username
password:
from_secret: harbor-password
---
kind: signature
hmac: 8c043d2aed9907a66298975c2f297a995d45a12155e519468f3a5303f23f2f33