Dpl: Bintray deployment: uploading failed but deployment succeeds

Created on 28 Apr 2016  路  18Comments  路  Source: travis-ci/dpl

Uploading debian packages to bintray has failed with code 400 but overall result of the deployment is still success for some reason and the build is marked as succeeded.

Expected result: if uploading any of the files fails then deployment should be interrupted and exit code should not be 0 (success).

Here is the log:
https://travis-ci.org/igagis/stob/jobs/126350018

Excerpt from log:

[Bintray Upload] Reading descriptor file: travis_bintray.json

[Bintray Upload] Uploading file '../libstob-dev_3.2.0_amd64.deb' to libstob-dev_3.2.0_amd64.deb

[Bintray Upload] Bintray response: 400 Bad Request. Error occurred while uploading

[Bintray Upload] Uploading file '../libstob-doc_3.2.0_all.deb' to libstob-doc_3.2.0_all.deb

[Bintray Upload] Bintray response: 400 Bad Request. Error occurred while uploading

[Bintray Upload] Uploading file '../libstob1-dbg_3.2.0_amd64.deb' to libstob1-dbg_3.2.0_amd64.deb

[Bintray Upload] Bintray response: 400 Bad Request. Error occurred while uploading

[Bintray Upload] Uploading file '../libstob1_3.2.0_amd64.deb' to libstob1_3.2.0_amd64.deb

[Bintray Upload] Bintray response: 400 Bad Request. Error occurred while uploading

[Bintray Upload] Publishing version 'all' of package 'libstob'...

[Bintray Upload] Bintray response: 200 OK. 
bintray stale

All 18 comments

Paging @eyalbe4 and @clayreimann, who contributed Bintray support.

@igagis, I'm guessing that the "400 Bad Request" is returned from Bintray because of the ".." in the upload path. It looks like the provider does not currently support ".." as part of the file path. Can you please confirm that your json file configuration includes ".."?

@eyalbe4 actually no, it dies not. It was working before and then it stopped without any reason. Anyway, now it seems working again.

The problem reported by this bug is that travis-ci Bintray provider does not handle any errors.

@igagis, by "does not handle any errors", do you mean that it does not stop in case one of the requests fails? (in this case with HTTP response 400).

@eyalbe4 exactly!

Got it @igagis. We'll submit a pull request to fix this.
BTW, JFrog CLI has been released recently and it can also be used from Travis-CI for Bintray and Artifactory uploads, downloads and more.

Any progress on that?

also meet this problem. is it fixed ?

my failure example : https://travis-ci.org/RackHD/on-dhcp-proxy/jobs/166725707
at the end, bintray upload failed, but Travis CI still happy :-)

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

this is not fixed yet, as far as I know

We recommend using JFrog CLI for Bintray deployment. It is very popular, regularly maintained, includees much more functionality and is easier to work with.

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 24 hours. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

We recommend using JFrog CLI for artifacts deployment. The tool is very popular, includes many useful features, it is optimized for Bintray and is regularly maintained.

Please fix this in the documented provider or remove the provider from Travis CI altogether. At least add a big warning at the top saying that this provider cannot be relied on in a CI/CD pipeline.

Will do @haphut.

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

For those who are still interested, I made my own bash script for deployment to bintray debian repos.

Usage:

  • add my repo to your sources.list (select one for your distribution)
deb http://dl.bintray.com/igagis/debian stretch main
deb http://dl.bintray.com/igagis/ubuntu xenial main
deb http://dl.bintray.com/igagis/ubuntu bionic main
  • install myci package
sudo apt update
sudo apt install myci
  • set the MYCI_BINTRAY_API_KEY environment variable to your bintray API key:
export MYCI_BINTRAY_API_KEY=11234ab1234ab123453453426466345f346d456c0
  • then use the myci-deploy-debian-bintray.sh script to deploy your packages
myci-deploy-debian-bintray.sh -u <bintray-user-name> -r <bintray-repo-name> -p <package-name> -c <deb_component> -d <deb_distribution> <package-filename> [<package-filename> ...]

In .travis.yml I use it with the apt addon like this:

addons:
  apt:
    sources:
      - sourceline: 'deb http://dl.bintray.com/igagis/ubuntu xenial main'
        key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x379CE192D401AB61'
    update: true
    packages:
    - myci

env:
  global:
  # Encrypted MYCI_BINTRAY_API_KEY=11234ab1234ab123453453426466345f346d456c0
  - secure: "lGHTuMOVQNm6Wsp8cl64Txa3KsObqVOHYpDbtEqPbsGztbxy2SQonDzlAi1JKze85HVxP/Zp4ICAPUGbpZ8eaI7d9xEjzu2NpX5fS5qXmeI+1QTbGRCLWFlf4SMYgpiMUNUxslmoXXBW/TqlTRdAqQnoDgAEyyZJbHxIzO3QlW6K0PioBrOFoB5BI4P4ENPy0CW+KqXMoy1ABZvRGT7HoqTt56yFIUFtr4OZTCOxhvxDQObeVFCGTVBoRqYYrbJPtYSBm4u1P3gJUjA0S8UJ4pDJZZU8xjJe3sq//DZacsC3/WN+PXAuqoJOmex/zogo9EFfIh6SDXgwFYvCeQWRdhapwOcsnUocXRbPpKIPyYxZmAM0AwaDXysrjLZs9fdMDBlRJVYp5w3mlWJfH0bZU8zrC3dg8wJZMKt0Tyr8A+4whapkj8pCRuUH5UytuDtkF+RYg3AqIrqG3Zuk4LP7dQXVSCgpp5yjX72Axofcu07OC3jxUdkVxt0Btkw1FM+NaeN13BiU9cHZzNyHFi2C4uY4cELrGL0cvsIv0dSflW3tJjwyFUO2Y3g68jPwiqGgMhzkAZZ/H0pmaNspoGoWe016ZTKQqXN2SvtLoSSVeHiOIJXbYkX+47rZ6Pt6Bdz+kvbn6avz7VDHARIpF4rpw3kMcPVsw7vb75Jk/QiI8rE="


...

deploy:
- provider: script
  skip_cleanup: true
  script: myci-deploy-debian-bintray.sh -u igagis -r my_deb_repo -p my_package -c main -d stretch $TRAVIS_BUILD_DIR/../*.deb

in case uploading a file to bintray fails the script also fails, so the whole travis job will be marked as failed.

Script sources can be found on https://github.com/igagis/myci

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sandfox picture sandfox  路  8Comments

poulad picture poulad  路  8Comments

jingsam picture jingsam  路  7Comments

rodmoreno picture rodmoreno  路  3Comments

DanTup picture DanTup  路  5Comments