-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
42 lines (33 loc) · 770 Bytes
/
main.go
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
// SPDX-License-Identifier: Apache-2.0
// (c) 2024, Konstantin Demin
package main
import (
"codeberg.org/woodpecker-plugins/go-plugin"
uspec "git.krd.sh/krd/woodpecker-sonatype-nexus/nexus/upload_spec"
)
const (
MaxAssetsPerUpload = 32
)
type Plugin struct {
*plugin.Plugin
Settings *Settings
RestUrl string
AuthHeader string
AuthValue string
UploadSpecs map[string]uspec.UploadSpec
UploadSpecFallback bool
Uploads []UploadRule
}
func main() {
p := &Plugin{
Settings: &Settings{},
}
p.Plugin = plugin.New(plugin.Options{
Name: "woodpecker-sonatype-nexus",
Description: "Woodpecker CI plugin to publish artifacts to Sonatype Nexus",
Version: "0.0.3",
Flags: p.Flags(),
Execute: p.Execute,
})
p.Run()
}