Files
vctp2/.drone.yml
Nathan Coad a81613a8c2
Some checks failed
continuous-integration/drone/push Build was killed
fix drone and sqlc generation
2026-01-13 19:49:13 +11:00

89 lines
1.9 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: restore-cache-with-filesystem
image: meltwater/drone-cache
pull: true
settings:
backend: "filesystem"
#debug: true
restore: true
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
archive_format: "tar"
filesystem_cache_root: "/go"
local_root: /
mount:
- pkg.mod
- pkg.build
volumes:
- name: cache
path: /go
- name: build
image: golang
environment:
CGO_ENABLED: 0
GOMODCACHE: '/drone/src/pkg.mod'
GOCACHE: '/drone/src/pkg.build'
GOBIN: '/drone/src/pkg.tools'
volumes:
- name: shared
path: /shared
commands:
- export PATH=/drone/src/pkg.tools:$PATH
- go install github.com/a-h/templ/cmd/templ@latest
- go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
- go install github.com/swaggo/swag/cmd/swag@latest
- sqlc generate
- templ generate -path ./components
- swag init --exclude "pkg.mod,pkg.build,pkg.tools" -o server/router/docs
- chmod +x ./scripts/*.sh
- ./scripts/update-swagger-ui.sh
- ./scripts/drone.sh
- cp ./build/cbs-linux-amd64 /shared/
- name: dell-sftp-deploy
image: hypervtechnics/drone-sftp
settings:
host: deft.dell.com
username:
from_secret: DELLFTP_USER
password:
from_secret: DELLFTP_PASS
port: 22
source: ./build
filter: vctp*
clean: false
target: /
overwrite: true
verbose: true
- name: rebuild-cache-with-filesystem
image: meltwater/drone-cache
pull: true
#when:
# event:
# - tag
settings:
backend: "filesystem"
#debug: true
rebuild: true
cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}'
archive_format: "tar"
filesystem_cache_root: "/go"
mount:
- pkg.mod
- pkg.build
volumes:
- name: cache
path: /go
volumes:
- name: shared
temp: {}
- name: cache
host:
path: /var/lib/cache