Example project showcasing how to combine several Replicated tools in order to manage Replicated YAML using a git repository.
The project includes CI configs for Travis CI and CircleCI. Both configs will:
On pull requests:
- Install dependencies
- Lint yaml for syntax and logic errors
On merges to the github master branch:
- Install dependencies
- Test yaml for syntax and logic errors
- Create a new release on the
Unstablechannel in Replicated
On merges to the github release branch:
- Install dependencies
- Test yaml for syntax and logic errors
- Create a new release on the
Stablechannel in Replicated
make deps -- Install replicated yaml linter and replicated vendor cli
make lint -- Lint the yaml at replicated.yml
make release -- Deploy and promote a new release to the replicated vendor portal. By default it will be promoted to the Unstable channel, but can be overriden by the channel make variable:
make release channel="Beta"We use this to deploy releases to other channels.
You'll need to set the following env vars to run the project:
REPLICATED_APP - either an app slug or app ID
REPLICATED_API_TOKEN - a token for the Replicated Vendor API
If you need help finding the values for these, check out the guide for Finding Your API Token and App ID
To enable linting, you'll need to be using a build environment that provides a
reasonably recent version of nodejs. We use 8.7.0 in this example, see circle.yml
and .travis.yml for examples on how to set this up for Travis CI and CircleCI
Repo includes two examples of using CI to test pull requests. Travis will test PRs from forks automatically, but CircleCI requires enabling building for the fork.
There's a passing pull request at replicatedhq#1. It has all its checks passing:
There's a failing pull request at replicatedhq#2. It has checks failing:
The travis build shows the failure in the build log:
We can even use replicated-lint's JUnit XML reporter to integrate with Circle's test report parsing:



