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

24 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
10c6df73c0
chore: more cleanup 2017-12-18 09:00:19 -02:00
Carlos Alexandro Becker
97ac740233
fix: added more tests to artifactory 2017-12-17 22:54:24 -02:00
Carlos Alexandro Becker
9ac3b8cf79
fix: cleaning up artifactory 2017-12-17 22:50:49 -02:00
Carlos Alexandro Becker
ab5e431b95
fix: cleaning up artifactory 2017-12-17 22:46:49 -02:00
Carlos Alexandro Becker
df5d9c0b43
test: fixed artifactory pipe tests 2017-12-17 21:57:24 -02:00
Carlos Alexandro Becker
8a0b484cab
fix: wip fixing artifactory 2017-12-17 19:19:44 -02:00
Carlos Alexandro Becker
574b2942b3
refactor: refactored artifactory pipe 2017-12-17 16:10:40 -02:00
Andy Grunwald
af618f9b69 refactor: Removed os.Getenv / os.Setenv in favor of ctx.Env
goreleaser offers a ctx.Env map to access env variables.
os.GetEnv and os.Setenv usages where removed from
Artifactory pipeline in favor of cts.Env access.
This makes testing easier
2017-12-10 14:41:27 +01:00
Andy Grunwald
4e4529bbf8 refactor: Simplified if checks for configured artifactories
-       if l := len(ctx.Config.Artifactories); l == 0 {
+       if len(ctx.Config.Artifactories) == 0 {
2017-12-10 14:23:32 +01:00
Andy Grunwald
240a70e17c test: Added three new unit tests for Artifactory pipeline
New tests added:
- TestRunPipe_TargetTemplateError
- TestRunPipe_UnparsableErrorResponse
- TestRunPipe_SkipWhenPublishFalse
2017-12-09 23:34:25 +01:00
Andy Grunwald
eacabadc40 test: Fix unit test TestArtifactoriesWithInvalidMode
The unit test TestArtifactoriesWithInvalidMode was not testing
what it should be. The publish parameter was not set and we
were testing for skipping instead of error
2017-12-09 22:53:44 +01:00
Andy Grunwald
3fa0fe5708 test: Add more unit tests for Artifactory pipeline
Added a couple of new unit tests, e.g. to test
- Defaults
- Mode: archive
2017-12-09 22:25:03 +01:00
Andy Grunwald
4021a8e41f refactor: Generalized uploadAssetAndLog in Artifactory pipeline
uploadBinary and uploadArchive where nearly the same code.
We generalized uploadAssetAndLog() to handle both cases
2017-12-09 21:38:17 +01:00
Andy Grunwald
51bc617d32 fix: shadows declaration (vetshadow)
vetshadow throwed two warnings of shadows declaration of err
2017-12-09 21:20:02 +01:00
Andy Grunwald
d875dd0dd5 feat: Implemented upload mode for Artifactory pipeline
The Artifactory pipeline now supports two different
types of upload modes:

- binary: Only the raw binaries will be uploaded
- archive: All artifacts that are generated will be uploaded
2017-12-09 20:54:04 +01:00
Andy Grunwald
27a9abc73b refactor: Introduced name per artifactory instance for identification
This introduced a new property per Artifactory instance: Name
With this name we are able to

a) identify a instance
b) use the name to identify the secret (instead of a number)
c) use this name for logging
2017-12-09 18:17:37 +01:00
Andy Grunwald
1f5df43e75 Merge branch 'master' into artifactory-support
* master: (47 commits)
  docs: add docs for env vars in name_template
  test: add test for name_template with env var
  feat: support env vars for name_template
  docs: Fixed broken homebrew link
  docs: fixed master build status badge on readme
  chore: misspeled word on package docs
  feat: improved release notes
  chore: create config.yml
  chore: create stale.yml
  chore: push docs to master
  chore: changing the order of the tasks
  chore: using https instead of ssh url
  chore: always run make static on build
  chore: using travis deploy feature
  chore: automating docs deployment
  fix: do not decorate git log output
  chore: make static pushes repo as well
  docs: env support for docker tag_template
  feat: allow env vars for docker tag_template
  fix: move env vars to context
  ...
2017-12-08 21:50:02 +01:00
Andy Grunwald
0b0c12aaad fix: Adjusted codebase according comments from @caarlos0
- Renamed function to upload()
- Fixed an inline comment
- Excluded a defer file.Close() from errcheck analysis
2017-12-02 23:39:39 +01:00
Andy Grunwald
78f83ec466 test: Add three new unit tests for Artifactory pipeline
Three new unit tests added:
- TestRunPipe_NoFile: Checks the error if the file for the
upload is not there
- TestRunPipe_UnparsableTarget: Checks that an error will
be thrown if the target is not parsable
- TestRunPipe_DirUpload: Checks that an error will be
thrown when we try to upload a directory
2017-12-02 22:03:01 +01:00
Andy Grunwald
2842b86365 fix: Don't continue Artifactory pipeline when there is an error
We are able to define multiple Artifactory instances.
In the former implementation, we continue once one instance upload
was failing. Now we stop and throw the error.
2017-12-02 21:40:14 +01:00
Andy Grunwald
37bc09f2bc fix: Use HTTP error if upload to Artifactory failes
In a former commit we respected the error of the Close()
call for a HTTP response. The fix was to introduce named
return values (e.g. err for error).
The problem: We defered the resp.Close() via
err = resp.Close()
This had the effect of always overwrite the real error
that happen when the HTTP call failes (due to checkResponse func).
2017-12-02 21:29:59 +01:00
Andy Grunwald
024ca0a1af fix: panic while access a http response in Artifactory pipeline
When the upload target is not resolvable by tcp (e.g. unknown host)
no response object will be generated.
In an error case the response object is used (it was assumed that
this will be there at every point in time).

This commit fixes this behaviour
2017-12-02 21:10:32 +01:00
Andy Grunwald
c1d2c28b0a fix: gometalinter warnings for Artifactory pipeline
gometalinter had several warnings about not respected
err return values from Close() calls
2017-12-02 20:47:02 +01:00
Andy Grunwald
492a018b7f feat: Added basic support to push binaries into Artifactory
Artifactory is an universal Artifact Repository Manager by
JFrog. See https://www.jfrog.com/artifactory/

It is available in an OSS and Enterprise version.
Many companies using this internally to store, manage and
distribute binaries within their internal infrastructure.

It adds basic support to push all generated binaries into an
Artifactory. Basic means only the built artifacts. Without
checksums or archives.
As an authentication only Basic auth is supported by this Pipe.

See #344
2017-12-02 20:26:55 +01:00