Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifacts env setting are incorrectly overridden #3432

Closed
meatballhat opened this issue Mar 23, 2015 · 7 comments
Closed

Artifacts env setting are incorrectly overridden #3432

meatballhat opened this issue Mar 23, 2015 · 7 comments
Assignees

Comments

@meatballhat
Copy link

e.g. if ARTIFACTS_PATHS is set in the environment but not at addons.artifacts.paths, then the default value of ARTIFACTS_PATHS="$(git ls-files -o | tr "\n" ":")" is exported. Additionally, the paths appear to be passed as positional arguments, which results in errors like:

$ artifacts upload
/home/travis/build.sh: line 41: /home/travis/bin/artifacts: Argument list too long
/home/travis/build.sh: line 73: /bin/uname: Argument list too long
/home/travis/build.sh: line 81: /bin/date: Argument list too long
/home/travis/build.sh: line 65: -: syntax error: operand expected (error token is "-")
@lekshmideepu
Copy link

I also came across the same error:

Uploading Artifacts (BETA)
$ travis_artifacts_install
artifacts version v0.7.8-9-g0908379 revision=09083791933418ce154332d7ef83bdee4330adb8
$ export ARTIFACTS_PATHS="$(git ls-files -o | tr \"\\n\" \":\")"
/home/travis/build.sh: line 73: /bin/uname: Argument list too long
/home/travis/build.sh: line 81: /bin/date: Argument list too long
$ artifacts upload
/home/travis/build.sh: line 41: /home/travis/bin/artifacts: Argument list too long
/home/travis/build.sh: line 73: /bin/uname: Argument list too long
/home/travis/build.sh: line 81: /bin/date: Argument list too long
/home/travis/build.sh: line 65: -: syntax error: operand expected (error token is "-")
Done uploading artefacts

I tried declaring ARTIFACTS_TARGET_PATHS in the env:global part as given below:


ARTIFACTS_TARGET_PATHS="artifacts/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER:artifacts/$TRAVIS_COMMIT"

Also set the addons: artifacts: true
Still getting the same error message given above.
Any help will be very much appreciated!

@BanzaiMan
Copy link
Contributor

@meatballhat Could you take a look at this soon? Thanks.

@meatballhat
Copy link
Author

The version of artifacts being used in production now (via travis-build) is v0.7.8-25-ge2af40f, which includes some changes meant to address this issue. For anyone still experiencing issues, pretty please post URLs or job output 😻

@proppy
Copy link

proppy commented Dec 18, 2015

@meatballhat I still have some issue with artefacts

https://travis-ci.org/googlesamples/android-ndk/builds
https://s3.amazonaws.com/archive.travis-ci.org/jobs/97599159/log.txt

[33;1mUploading Artifacts (BETA)�[0m
travis_fold:start:artifacts.setup
�[0Kartifacts version v0.7.8-25-ge2af40f revision=e2af40fea0aa0229ff1f26e932e018c71e95bb91
$ export ARTIFACTS_PATHS="$(git ls-files -o | tr \"\\n\" \":\")"
travis_fold:end:artifacts.setup
�[0K$ artifacts upload
/home/travis/build.sh: line 45: /home/travis/bin/artifacts: Argument list too long
�[33;1mDone uploading artifacts�[0m

Note: it works after restricting the artifacts path, see:
https://travis-ci.org/google/bazel/jobs/70806426

@adilansari
Copy link

@meatballhat
Copy link
Author

I'm closing this out given that the version of artifacts in production has since been updated. Please yell (with job URLs) if you're still seeing issues. ❤️

@olivierlacan
Copy link

olivierlacan commented Feb 23, 2017

@meatballhat Still having this issue with repository setting env vars.

They print correctly at the top of the build:

$ export ARTIFACTS_PATHS="log/test.log"

Despite that:

Uploading Artifacts (BETA)
artifacts.setup
artifacts version v0.7.8-26-gd62580b revision=d62580ba6bfffc7245d8ac6a1a384ef60b9302e7
$ export ARTIFACTS_PATHS="$(git ls-files -o | tr \"\\n\" \":\")"
$ artifacts upload
/home/travis/build.sh: line 62: /home/travis/bin/artifacts: Argument list too long
Done uploading artifacts

It appears that it's ignoring any previously set ARTIFACTS_PATHS env var. Going to try the YAML way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants