Kork Library
Kork is a common library used across multiple Spinnaker components.
Introduction
Kork is a common library used across multiple Spinnaker components. A component uses a specific version of Kork depending on the last time that component’s spinnaker-dependencies version was updated. This guide is meant for developers who need to make changes to Kork, test those changes locally in the component that relies on those changes, and deploy those changes once they’ve been submitted.
Local development cycle
Kork
- Make desired changes to
kork
module locally. - Invoke
$ ./gradlew -PenablePublishing=true -Pversion=0.1.0-SNAPSHOT publishToMavenLocal
. - Make note of the version:
$ ./gradlew -PenablePublishing=true publishToMavenLocal
Inferred project: kork, version: 0.1.0-SNAPSHOT
Component (Gate, Orca, Clouddriver, etc.)
With Kork now in your local maven repository (~/.m2/
by default), we must make the component pickup this new version.
- In the component’s
build.gradle
file, add the following inside theallprojects
block:
repositories {
mavenLocal()
}
Inside the
allprojects.configurations.all.resolutionStrategy
block, add this, replacing the version with the version printed from thepublishToMavenLocal
task:eachDependency {
if (it.requested.group == 'io.spinnaker.kork') it.useVersion '0.1.0-SNAPSHOT'
}
Voila! The component now uses your locally source, hand-crafted, artisan Kork library!
Release process
Kork
- Create and submit a PR for your Kork changes.
- Create a new Kork release that follows the version naming convention. Make note of this version number.
- Monitor the Travis CI build and confirm the new packages have been deployed to Bintray .
Spinnaker-dependencies
- Create and submit a new PR to the spinnaker-dependencies.yml file that updates the Kork library to your new version.
- Create a new spinnaker-dependencies release that follows the version naming convention. Again, make note of this version number.
- Monitor the Travis CI build and confirm the new packages have been deployed to Bintray .
Component
Edit your component’s
build.gradle
file to update theallprojects.spinnaker.depenciesVersion
to the newly releasedspinnaker-dependencies
version.spinnaker {
dependenciesVersion = "0.34.0"
}
Build and test locally to ensure all of the new library versions pulled in haven’t broken anything
$ ./gradlew test
Create a submit a PR to the component that includes bumping this version number and any build/test fixes.
Create and submit a PR for the feature that relied on the Kork changes.
Last modified February 17, 2022: Update instructions to build and use kork in local development. (#181) (cbb30bf)