{"__v":2,"_id":"5734fb45eea4e80e000b0b23","category":{"project":"55c6bec1b9aa4e0d0016c2c3","version":"55c6bec1b9aa4e0d0016c2c6","_id":"5734fafd146eb82000597261","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-12T21:51:57.060Z","from_sync":false,"order":6,"slug":"development","title":"Development"},"parentDoc":null,"project":"55c6bec1b9aa4e0d0016c2c3","user":"56f2913a2344ff0e006c0119","version":{"__v":8,"_id":"55c6bec1b9aa4e0d0016c2c6","project":"55c6bec1b9aa4e0d0016c2c3","createdAt":"2015-08-09T02:45:21.683Z","releaseDate":"2015-08-09T02:45:21.683Z","categories":["55c6bec2b9aa4e0d0016c2c7","56c14bc5826df10d00e82230","56cceed8723ad71d00cae46c","56ccf29a431ada1f00e85aae","56ccf3c28fa8b01b00b82018","56ce1e6ee538330b0021ac5d","56f97e9a4c612020008f2eaf","5734fafd146eb82000597261"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-12T21:53:09.011Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"# Introduction\n\n[Kork](https://github.com/spinnaker/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](https://github.com/spinnaker/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.\n\n## Local Development Cycle\n### Kork\n\n1. Make desired changes to `kork` module locally.\n2. Invoke `$ ./gradlew publishToMavenLocal`.\n3. Make note of the version printed:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ ./gradlew publishToMavenLocal\\nInferred project: kork, version: 0.1.0-SNAPSHOT\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n### Component (Gate, Orca, Clouddriver, etc.)\n\nWith Kork now in your local maven repository (`~/.m2/` by default), we must make the component pickup this new version.\n\n1.  In the component's `build.gradle` file, add the following inside the `allprojects` block:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"repositories {\\n  mavenLocal()\\n}\",\n      \"language\": \"groovy\"\n    }\n  ]\n}\n[/block]\n2. Inside the `allprojects.configurations.all.resolutionStrategy` block, add this, replacing the version with the version printed from the `publishToMavenLocal` task:\n\n    ```\n    eachDependency {\n      if (it.requested.group == 'com.netflix.spinnaker.kork') it.useVersion '0.1.0-SNAPSHOT'\n    }\n    ```\n\n3. Voila! The component now uses your locally source, hand-crafted, artisan Kork library!\n\n## Release Process\n\n### Kork\n1. Create and submit a PR for your Kork changes.\n2. Create a new Kork [release](https://github.com/spinnaker/kork/releases) that follows the version naming convention. Make note of this version number.\n3. Monitor the Travis CI [build](https://travis-ci.org/spinnaker/kork) and confirm the new packages have been deployed to [Bintray](https://bintray.com/spinnaker/spinnaker/kork/view).\n\n### Spinnaker-Dependencies\n1. Create and submit a new PR to the [spinnaker-dependencies.yml](https://github.com/spinnaker/spinnaker-dependencies/blob/master/src/spinnaker-dependencies.yml) file that updates the Kork library to your new version.\n2. Create a new spinnaker-dependencies [release](https://github.com/spinnaker/spinnaker-dependencies/releases) that follows the version naming convention. Again, make note of this version number.\n3. Monitor the Travis CI [build](https://travis-ci.org/spinnaker/spinnaker-dependencies) and confirm the new packages have been deployed to [Bintray](https://bintray.com/spinnaker/spinnaker/spinnaker-dependencies/view).\n\n### Component\n1. Edit your component's `build.gradle` file to update the `allprojects.spinnaker.depenciesVersion` to the newly released `spinnaker-dependencies` version.\n\n    ```\n    spinnaker {\n      dependenciesVersion = \"0.34.0\"\n    }\n    ```\n2. Build and test locally to ensure all of the new library versions pulled in haven't broken anything\n\n    ```\n    $ ./gradlew test\n    ```\n\n3. Create a submit a PR to the component that includes bumping this version number and any build/test fixes.\n4. Create and submit a PR for the feature that relied on the Kork changes.","excerpt":"","slug":"kork-library-dev","type":"basic","title":"Making changes to the Kork Library"}

Making changes to the Kork Library


# Introduction [Kork](https://github.com/spinnaker/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](https://github.com/spinnaker/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 1. Make desired changes to `kork` module locally. 2. Invoke `$ ./gradlew publishToMavenLocal`. 3. Make note of the version printed: [block:code] { "codes": [ { "code": "$ ./gradlew publishToMavenLocal\nInferred project: kork, version: 0.1.0-SNAPSHOT", "language": "text" } ] } [/block] ### 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. 1. In the component's `build.gradle` file, add the following inside the `allprojects` block: [block:code] { "codes": [ { "code": "repositories {\n mavenLocal()\n}", "language": "groovy" } ] } [/block] 2. Inside the `allprojects.configurations.all.resolutionStrategy` block, add this, replacing the version with the version printed from the `publishToMavenLocal` task: ``` eachDependency { if (it.requested.group == 'com.netflix.spinnaker.kork') it.useVersion '0.1.0-SNAPSHOT' } ``` 3. Voila! The component now uses your locally source, hand-crafted, artisan Kork library! ## Release Process ### Kork 1. Create and submit a PR for your Kork changes. 2. Create a new Kork [release](https://github.com/spinnaker/kork/releases) that follows the version naming convention. Make note of this version number. 3. Monitor the Travis CI [build](https://travis-ci.org/spinnaker/kork) and confirm the new packages have been deployed to [Bintray](https://bintray.com/spinnaker/spinnaker/kork/view). ### Spinnaker-Dependencies 1. Create and submit a new PR to the [spinnaker-dependencies.yml](https://github.com/spinnaker/spinnaker-dependencies/blob/master/src/spinnaker-dependencies.yml) file that updates the Kork library to your new version. 2. Create a new spinnaker-dependencies [release](https://github.com/spinnaker/spinnaker-dependencies/releases) that follows the version naming convention. Again, make note of this version number. 3. Monitor the Travis CI [build](https://travis-ci.org/spinnaker/spinnaker-dependencies) and confirm the new packages have been deployed to [Bintray](https://bintray.com/spinnaker/spinnaker/spinnaker-dependencies/view). ### Component 1. Edit your component's `build.gradle` file to update the `allprojects.spinnaker.depenciesVersion` to the newly released `spinnaker-dependencies` version. ``` spinnaker { dependenciesVersion = "0.34.0" } ``` 2. Build and test locally to ensure all of the new library versions pulled in haven't broken anything ``` $ ./gradlew test ``` 3. Create a submit a PR to the component that includes bumping this version number and any build/test fixes. 4. Create and submit a PR for the feature that relied on the Kork changes.