POST
Updating Conan Packages with Wercker
I’ve recently invested lot of time in transitioning to Wercker for my CI needs. So far, I’m reasonably impressed.
One task I wanted was to automate was uploading an updated Conan package to conan.io
on a successful wercker
build. I’m not using the binary package functionality of Conan, just the dependency tracking.
Here’s the wercker.yml
from g2o_conan showing what I do.
box: amarburg/lsdslam-dev-host:conan-latest
build:
steps:
- script:
name: Debug test
code: |
rake debug:test
rake debug:clean
- script:
name: Upload to conan.io
code: |
conan user -p "$CONAN_PASSWORD" $CONAN_USERNAME
conan export amarburg/testing
conan upload "g2o*" --confirm
The second script step uses the conan command line to authenticate a user (set with the Wercker env. variables $CONAN_USERNAME
and $CONAN_PASSWORD
), export the package to the local conan store, and then push it to conan.io.
Note that your wercker box / Docker image needs to have conan installed. The ‘with-conan’ branch of my LSD-SLAM dev box has it baked in. The resulting image is amarburg/lsdslam-dev-host:conan-latest.