forked from srl-labs/containerlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
76 lines (74 loc) · 2.39 KB
/
.goreleaser.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
# Copyright 2020 Nokia
# Licensed under the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
project_name: containerlab
builds:
- id: clab-bin
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags=podman exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper exclude_graphdriver_overlay containers_image_openpgp
ldflags:
- -s -w -X github.com/srl-labs/containerlab/cmd.version={{.Version}} -X github.com/srl-labs/containerlab/cmd.commit={{.ShortCommit}} -X github.com/srl-labs/containerlab/cmd.date={{.Date}}
goos:
- linux
goarch:
- amd64
- arm64
hooks:
post: upx "{{ .Path }}"
dockers:
- goos: linux
goarch: amd64
image_templates:
# if version starts with v0.0.0 this is a beta build, for which we don't apply the `latest` tag and apply `beta` tag instead
- '{{ $pfx := slice .Version 0 6}}{{- if eq $pfx "v0.0.0"}}ghcr.io/srl-labs/clab:beta{{else}}ghcr.io/srl-labs/clab:latest{{- end }}'
- 'ghcr.io/srl-labs/clab:{{ replace .Version "v" ""}}'
dockerfile: goreleaser.dockerfile
archives:
- replacements:
linux: Linux
files:
- lab-examples/**/*
checksum:
name_template: checksums.txt
snapshot:
name_template: "{{ .Tag }}-next"
publishers:
- name: fury.io deb/rpm packages
ids:
- containerlab-nfpms # this id belongs to nfpm section and is used to only upload artifacts from nfpm
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/netdevops/
release:
prerelease: auto
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
nfpms:
- id: containerlab-nfpms
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
package_name: containerlab
maintainer: Wim Henderickx <[email protected]>, Karim Radhouani <[email protected]>, Roman Dodin <[email protected]>
homepage: https://containerlab.dev
description: |
containerlab deploys containerized networking topologies
vendor: Nokia
license: GNU GPLv3
formats:
- rpm
- deb
- apk
bindir: /usr/bin
contents:
- src: ./lab-examples
dst: /etc/containerlab/lab-examples
- src: ./templates
dst: /etc/containerlab/templates
- src: /usr/bin/containerlab
dst: /usr/bin/clab
type: symlink