forked from telenornms/skogul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
107 lines (98 loc) · 1.99 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
image: golang
commands:
- go build ./cmd/skogul
- name: test
image: golang
commands:
- apt-get update
- apt-get -y install make
- go get golang.org/x/lint/golint
- make check
depends_on:
- build
- name: prepare-release
image: golang
commands:
- apt-get update
- apt-get -y install make python3-docutils bzip2 gawk
- make clean install GIT_DESCRIBE=${DRONE_TAG} DESTDIR=skogul-${DRONE_TAG}
- make GIT_DESCRIBE=${DRONE_TAG} notes
- tar cvjf skogul-${DRONE_TAG}.tar.bz2 skogul-${DRONE_TAG}
depends_on:
- test
when:
event:
- tag
- name: publish-container-image-version
image: plugins/docker
settings:
username: telenornms
password:
from_secret: github_release_api_key
repo: ghcr.io/telenornms/skogul
tags: ${DRONE_TAG}
registry: ghcr.io
depends_on:
- test
when:
event:
- tag
- name: publish-container-image-latest
image: plugins/docker
settings:
username: telenornms
password:
from_secret: github_release_api_key
repo: ghcr.io/telenornms/skogul
tags: latest
registry: ghcr.io
depends_on:
- test
when:
event:
- tag
- name: prepare-centos-release
image: rockylinux:8
environment:
SHELL: /bin/bash
commands:
- yum install -y git python3-docutils rpm-build wget make
- wget https://storage.googleapis.com/golang/getgo/installer_linux
- chmod +x installer_linux
- ./installer_linux
- source /root/.bash_profile
- make GIT_DESCRIBE=${DRONE_TAG} rpm
depends_on:
- prepare-release
when:
event:
- tag
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: github_release_api_key
checksum:
- sha256
draft: true
files:
- skogul-*.tar.bz2
- skogul-*.rpm
note: notes
title: Skogul ${DRONE_TAG}
depends_on:
- prepare-release
- prepare-centos-release
when:
event:
- tag
...