Travis CI

CodeNotary integration with popular CI/CD tool Travis CI allows you to produce validated builds that can be verified and authenticated by anyone from everywhere.

Requirements

Please install the latest version the CodeNotary vcn CLI. It can be downloaded from GitHub vcn repository or directly from the dashboard https://dashboard.codenotary.io download.

Usage

To integrate with Travis CI, please follow these steps:

  • Create the file .travis.yml within your repository you want to notarize
  • Define the Travis CI build steps and add CodeNotary credentials to your Travis environment variables (VCN_USER, VCN_PASS, VCN_NOTARIZATION_PASSWORD)
  • Authenticate the downloaded binary (better safe than sorry)
  • Build the docker image
  • Notarize the docker image including the Travis CI build number

Example Download and authenticate vcn command line:

before_script:
- sudo apt update && sudo apt install curl  -y
- curl -L -o /tmp/vcn https://github.com/vchain-us/vcn/releases/download/v0.8.3/vcn-v0.8.3-linux-amd64-static
- CHECKSUM=$(sha256sum /tmp/vcn | cut -d " " -f 1)
- echo $CHECKSUM
- curl -s https://api.codenotary.io/authenticate/$CHECKSUM?org=vchain.us | grep -q :0

script:
- VCN_USER=$codenotary_user VCN_PASSWORD=$codenotary_pass /tmp/vcn login
- VCN_NOTARIZATION_PASSWORD=$codenotary_pass /tmp/vcn n -p --attr TravisCI=${TRAVIS_BUILD_NUMBER} --silent docker://$DOCKER_IMAGE

Go to documentation