1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/internal/pipeline/pipeline.go

59 lines
2.5 KiB
Go
Raw Normal View History

// Package pipeline provides generic erros for pipes to use.
2016-12-30 13:27:35 +02:00
package pipeline
2018-09-12 19:18:01 +02:00
import (
"fmt"
"github.com/goreleaser/goreleaser/internal/pipe/brew"
2019-01-19 20:57:58 +02:00
"github.com/goreleaser/goreleaser/internal/pipe/semver"
2018-09-12 19:18:01 +02:00
"github.com/goreleaser/goreleaser/internal/pipe/archive"
"github.com/goreleaser/goreleaser/internal/pipe/before"
"github.com/goreleaser/goreleaser/internal/pipe/build"
"github.com/goreleaser/goreleaser/internal/pipe/changelog"
"github.com/goreleaser/goreleaser/internal/pipe/checksums"
"github.com/goreleaser/goreleaser/internal/pipe/defaults"
"github.com/goreleaser/goreleaser/internal/pipe/dist"
"github.com/goreleaser/goreleaser/internal/pipe/docker"
"github.com/goreleaser/goreleaser/internal/pipe/effectiveconfig"
"github.com/goreleaser/goreleaser/internal/pipe/env"
"github.com/goreleaser/goreleaser/internal/pipe/git"
"github.com/goreleaser/goreleaser/internal/pipe/nfpm"
2018-10-05 14:22:53 +02:00
"github.com/goreleaser/goreleaser/internal/pipe/publish"
2018-09-12 19:18:01 +02:00
"github.com/goreleaser/goreleaser/internal/pipe/sign"
"github.com/goreleaser/goreleaser/internal/pipe/snapcraft"
2018-12-13 14:09:36 +02:00
"github.com/goreleaser/goreleaser/internal/pipe/snapshot"
2018-09-12 19:18:01 +02:00
"github.com/goreleaser/goreleaser/pkg/context"
)
// Piper defines a pipe, which can be part of a pipeline (a serie of pipes).
type Piper interface {
fmt.Stringer
// Run the pipe
Run(ctx *context.Context) error
2017-08-20 21:35:46 +02:00
}
2018-09-12 19:18:01 +02:00
// Pipeline contains all pipe implementations in order
2018-11-08 02:04:49 +02:00
// nolint: gochecknoglobals
2018-09-12 19:18:01 +02:00
var Pipeline = []Piper{
before.Pipe{}, // run global hooks before build
feat: add gitlab for releases (#1038) * outlines gitlab client integration * makes client parameter more explicit * adds gitlab url to config * changes releaseID to string to adapt to gitlab * updates to latest gitlab client lib 0.18 * fixes copy paster in gitlab upload func * fixes gitlab typo in config * adds gitlab token to env and context * release now uses the client factory method * skips brew pipe if it is not a github release * add github tokentype to publish tests * skips scoop pipe if it is not a github release * corrects brew skip msg * adds gitlab token to main test * adds gitlab to release docs * validates config and errors accordingly * adapt release pipe name to include gitlab * fixes gitlab client after testing * moves not-configured brew and scoop pipe checks as first check * adds more debug to gitlab client * adapts changelog generation for gitlab markdown * adds debug log for gitlab changelog * env needs to run before changelog pipe * moves gitlab default download url to default pipe * moves multiple releases check to from config to release pipe * release differs now for github and gitlab * adds debug gitlab release update msgs * moves env pipe as second after before because it determines the token type other pipes depend on * adaptes error check on gitlab release creation * Revert "adaptes error check on gitlab release creation" This reverts commit 032024571c76140f8e2207ee01cc08088f37594b. * simplifies gitlab client logic. removes comments * skips tls verification for gitlab client if specified in config * updates the docs * adds clarification that brew and scoop are not supported if it is a gitlab release * fixes copy paster in release.md * adds missing blob pipe in defaults and publish due to missing in merge * updates comment in gitlab client
2019-06-29 16:02:40 +02:00
env.Pipe{}, // load and validate environment variables
2018-09-12 19:18:01 +02:00
git.Pipe{}, // get and validate git repo state
2019-01-19 20:57:58 +02:00
semver.Pipe{}, // parse current tag to a semver
2018-11-25 21:30:30 +02:00
defaults.Pipe{}, // load default configs
2018-12-13 14:09:36 +02:00
snapshot.Pipe{}, // snapshot version handling
2018-11-25 21:30:30 +02:00
dist.Pipe{}, // ensure ./dist is clean
2018-09-12 19:18:01 +02:00
effectiveconfig.Pipe{}, // writes the actual config (with defaults et al set) to dist
changelog.Pipe{}, // builds the release changelog
build.Pipe{}, // build
archive.Pipe{}, // archive in tar.gz, zip or binary (which does no archiving at all)
nfpm.Pipe{}, // archive via fpm (deb, rpm) using "native" go impl
snapcraft.Pipe{}, // archive via snapcraft (snap)
checksums.Pipe{}, // checksums of the files
sign.Pipe{}, // sign artifacts
docker.Pipe{}, // create and push docker images
brew.Pipe{}, // create the formula file on dist
2018-10-05 14:22:53 +02:00
publish.Pipe{}, // publishes artifacts
2017-08-20 21:35:46 +02:00
}