| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- ---
- kind: pipeline
- type: kubernetes
- name: default
- steps:
- - name: fetch-tags
- image: alpine/git
- commands:
- - git fetch --tags
- resources:
- requests:
- cpu: 250
- memory: 50MiB
- limits:
- cpu: 250
- memory: 100MiB
- - name: test
- image: golang:1.20.5
- volumes:
- - name: cache
- path: /go
- commands:
- - ./scripts/download-test-geoip
- - go get
- - go test -v ./...
- - go build ./...
- resources:
- requests:
- cpu: 1000
- memory: 128MiB
- limits:
- cpu: 2000
- memory: 2GiB
- - name: goreleaser
- image: golang:1.20.5
- resources:
- requests:
- cpu: 4000
- memory: 512MiB
- limits:
- cpu: 10000
- memory: 2048MiB
- volumes:
- - name: cache
- path: /go
- commands:
- - ./scripts/run-goreleaser
- - echo Done
- when:
- ref:
- - refs/heads/main
- - refs/heads/drone-test
- - refs/tags/**
- depends_on: [test]
- - name: upload
- image: plugins/s3
- resources:
- requests:
- cpu: 250
- memory: 64MiB
- limits:
- cpu: 250
- memory: 256MiB
- settings:
- access_key:
- from_secret: s3_access_key
- secret_key:
- from_secret: s3_secret_key
- bucket: geodns
- target: /builds/test/${DRONE_BUILD_NUMBER}
- source: dist/*
- strip_prefix: dist/
- endpoint: https://minio-ewr1.develooper.com/
- path_style: true
- depends_on: [goreleaser]
- - name: fury-publish
- image: golang:1.20.5
- resources:
- requests:
- cpu: 250
- memory: 64MiB
- limits:
- cpu: 250
- memory: 256MiB
- environment:
- FURY_TOKEN:
- from_secret: fury_test_token
- commands:
- - ./scripts/fury-publish ntppool-test
- when:
- ref:
- - refs/heads/main
- - refs/heads/drone-test
- - refs/tags/**
- depends_on: [goreleaser]
- volumes:
- - name: cache
- temp: {}
- trigger:
- event:
- - push
- - tag
- - pull_request
- ---
- kind: pipeline
- type: kubernetes
- name: publish-production
- steps:
- - name: download
- image: golang:1.20.5
- commands:
- - ./scripts/download-release test/${DRONE_BUILD_PARENT} dist/
- resources:
- requests:
- cpu: 250
- memory: 64MiB
- limits:
- cpu: 250
- memory: 256MiB
- - name: upload
- image: plugins/s3
- resources:
- requests:
- cpu: 250
- memory: 64MiB
- limits:
- cpu: 250
- memory: 256MiB
- settings:
- access_key:
- from_secret: s3_access_key
- secret_key:
- from_secret: s3_secret_key
- bucket: geodns
- target: /builds/release/${DRONE_BUILD_NUMBER}
- source: dist/*
- strip_prefix: dist/
- endpoint: https://minio-ewr1.develooper.com/
- path_style: true
- depends_on: ["download"]
- - name: fury-publish
- image: golang:1.20.5
- resources:
- requests:
- cpu: 250
- memory: 64MiB
- limits:
- cpu: 250
- memory: 256MiB
- environment:
- FURY_TOKEN:
- from_secret: fury_token
- commands:
- - ./scripts/fury-publish ntppool
- depends_on: ["download"]
- trigger:
- event:
- - promote
- target:
- - publish
- ---
- kind: signature
- hmac: 15fb83a349cd0141f9195dd089e87f44af8e9469945a31a720368ab5ef623f19
- ...
|