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
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
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
* 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
...
In preparation to support env vars for Docker tag_template and also to
simplify the tests by not chaning the global os.Environ I've moved the
parsed env var map into the context.Context.
Right now the code looks weird because the defaults
of a pipe are far away of the implementation of the pipe.
the intend of this PR is to bring them closer by having a
Defaulter interface.
I also renamed the Pipe interface to Piper, and removed
the Description method in favor for fmt.Stringer.
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
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.
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).
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
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
Previous code was handling only main.go as the main build file, but
the main function can actually be in any file.
Now, if a specific file (*.go) is passed, that file will be checked
for the main function.
If a folder is passed, the package will be scanned for the main
function.
Rather than using a conditional to check if `bindir` has been set,
use the defaults pipe to set it to `/usr/local/bin` if it has not
been set in the config file.
Some packagers may want to put binaries in a location other than
/usr/local/bin. This allows one to override the destination for
binaries when using fpm, using the `fpm.bindir` config key.
FPM would randomly fail to build deb and rpm packages. It apparently
happens because fpm (or some tool it uses) shares state between runs
(possibly by overriding files that are going inside the archive).
The error `file changed as we read it` was happening, which is a `tar`
error.
I don't know how to fix this, but, in order to make goreleaser more
stable, I'll disable the concurrency here for now.
closes#333
TODO: factor all the name stuff
into a function like the others, so maybe
setNameDefaults(ctx), etc.
Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
We were checking for a .git folder, which would break in cases
where goreleaser is running from a subfolder of a monorepo, for example.
Check 529af6f#commitcomment-25011738
Closes#402#403
Improved the error handling in git code,
mostly in the defaults pipe. The idea is to
output better error messages, hopefully avoiding
confusion on "whats wrong".
refs #356
The field is optional. When set to true, files in archive are wrapped
in a directory, which has the same name as the archive itself.
Tests have also been extended to cover this.
Closes#251