Builder environment variables
All builders like CircleCI, Appveyor, Travis, etc. needs some environment variables. The procedures for setting them varies between the builders, see Cloud service changes However, the contents of each variable is the same on all builders. This page is a reference for these variables
Most users need to define
-
CLOUDSMITH_API_KEY
-
GIT_REPO
-
GIT_KEY_PASSWORD
CLOUDSMITH_API_KEY
This is a secret available in the Cloudsmith web UI in the account drop down top-right under the API Settings menu:
GIT_REPO
This a public configuration item related to the metadata push function to the opencpn/plugins catalog described in the metadata push page.
Metadata push requires user to have forked the github repository at https://github.com/opencpn/plugins. GIT_REPO should be set to the SSH-based url to this fork, something like git@github.com:leamas/plugins.git
The value can be obtained on the command line in the fork using
git config --get remote.origin.url
or using the GUI:
GIT_KEY_PASSWORD
A secret also related to the metadata push function described in the metadata push configuration page. This page describes how to run the script new-credentials. GIT_KEY_PASSWORD should be the password entered to this script.
Custom Cloudsmith Repositories
A plugin build usually uploads to cloudsmith repositories. The repositories used depends on the git tag attached to the build, if any. The repositories used by default are hardcoded in Plugin.cmake in snippets like
set(OCPN_TEST_REPO "opencpn/shipdriver-alpha" CACHE STRING "Default repository for untagged builds" ) set(OCPN_BETA_REPO "opencpn/shipdriver-beta" CACHE STRING "Default repository for tagged builds matching 'beta'" ) set(OCPN_RELEASE_REPO "opencpn/shipdriver-prod" CACHE STRING "Default repository for tagged builds not matching 'beta'" )
When forking a plugin, the developer hasn’t permissions to upload to these hardcoded repositories which belongs to the original owner. To fix this, other repos could be defined using the environment variables CLOUDSMITH_UNSTABLE_REPO, CLOUDSMITH_BETA_REPO and CLOUDSMITH_STABLE_REPO. The values are complete repo specifications like alec-leamas/opencpn-plugins-unstable.