diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5bf5fff7..20cca7a89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,24 +1,44 @@ # Contributions to the Kosli CLI +## Prerequisites + +You need to have the followin environment variable: + +`export KOSLI_API_TOKEN_PROD=YourKeyHere` + +As well as access to the KOSLI AWS accounts. + +If you have not gotten that, and you are a KOSLI employee, please [read this](https://github.com/kosli-dev/knowledge-base/blob/master/aws_vault.md). + +## Tools setup + +You can compile and run the project via [DevBox from Jetlify](https://www.jetify.com/docs/devbox/installing_devbox/) + +After the installation, run `devbox shell` and all relevant tools will be avaliable to you. + ## Running tests To run all tests, including the kubernetes tests, which take a few minutes: -``` + +```bash make test_integration_full ``` To run tests and ignore tests that take longer to run: -``` + +```bash make test_integration ``` To run a single test suite: -``` + +```bash make test_integration_single TARGET= ``` Some tests will be skipped if the following environment variables are not set: -``` + +```bash KOSLI_GITHUB_TOKEN KOSLI_GITLAB_TOKEN KOSLI_BITBUCKET_ACCESS_TOKEN @@ -26,12 +46,13 @@ KOSLI_AZURE_TOKEN KOSLI_SONAR_API_TOKEN ``` -Additionally authentication is necessary to run some tests. See https://github.com/kosli-dev/knowledge-base. +Additionally authentication is necessary to run some tests. See . ## Releases The version number is not generated automatically and must be decided manually. We are using semantic versioning (ie: 2.3.2). -``` + +```bash make release tag=v -``` \ No newline at end of file +``` diff --git a/devbox.json b/devbox.json new file mode 100644 index 000000000..a99af5b26 --- /dev/null +++ b/devbox.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.2/.schema/devbox.schema.json", + "packages": [ + "kubernetes-helm@latest", + "go@1.24", + "git@latest", + "gnumake@latest", + "awscli2@latest", + "hugo@latest" + ], + "shell": { + "init_hook": [ + "echo 'Welcome to devbox!' > /dev/null" + ], + "scripts": { + "test": [ + "echo \"Error: no test specified\" && exit 1" + ] + } + } +} diff --git a/devbox.lock b/devbox.lock new file mode 100644 index 000000000..d53c550de --- /dev/null +++ b/devbox.lock @@ -0,0 +1,381 @@ +{ + "lockfile_version": "1", + "packages": { + "awscli2@latest": { + "last_modified": "2025-05-19T23:16:24Z", + "resolved": "github:NixOS/nixpkgs/359c442b7d1f6229c1dc978116d32d6c07fe8440#awscli2", + "source": "devbox-search", + "version": "2.27.2", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/b5fa0fplfpiyx8zwc9y7d08a57lsk229-awscli2-2.27.2", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/sc270lyggbhz78lcxh9khqmggayqpp6i-awscli2-2.27.2-dist" + } + ], + "store_path": "/nix/store/b5fa0fplfpiyx8zwc9y7d08a57lsk229-awscli2-2.27.2" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/161s22pbddllc4mabgr5rvrpmhiffsp4-awscli2-2.27.2", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/ss8xqzwn1l8qdbwlml439bx1ik13vxlk-awscli2-2.27.2-dist" + } + ], + "store_path": "/nix/store/161s22pbddllc4mabgr5rvrpmhiffsp4-awscli2-2.27.2" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/l18j8wgidf145m0zw6ydg8blim44hrkq-awscli2-2.27.2", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/q9rzj2ikpl9vn4sns3ydsy7i8sachnha-awscli2-2.27.2-dist" + } + ], + "store_path": "/nix/store/l18j8wgidf145m0zw6ydg8blim44hrkq-awscli2-2.27.2" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/gx3hx0b3lbm11sishxl4k7a7ha4w405q-awscli2-2.27.2", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/r5cw3141myaf5lnzra9c0nc8prb2zv6y-awscli2-2.27.2-dist" + } + ], + "store_path": "/nix/store/gx3hx0b3lbm11sishxl4k7a7ha4w405q-awscli2-2.27.2" + } + } + }, + "git@latest": { + "last_modified": "2025-06-13T00:58:23Z", + "resolved": "github:NixOS/nixpkgs/6e7721e37bf00fa7ea44ac3cfc9d2411284ec3ef#git", + "source": "devbox-search", + "version": "2.49.0", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/9pa6rygnkrdp03j4ba0w6yb5qid5x3qb-git-2.49.0", + "default": true + }, + { + "name": "doc", + "path": "/nix/store/4a1f3ymqasdx2sfwn615n6x6z15qk5nd-git-2.49.0-doc" + } + ], + "store_path": "/nix/store/9pa6rygnkrdp03j4ba0w6yb5qid5x3qb-git-2.49.0" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/bqk89pw1wmjzrqi20vqz194ylfhl5cnm-git-2.49.0", + "default": true + }, + { + "name": "debug", + "path": "/nix/store/ypv73aihzciz9x12imf5dvz4qkn4wakd-git-2.49.0-debug" + }, + { + "name": "doc", + "path": "/nix/store/ll9hlbwp3vvihpx2p2g7mykrl2a4snk4-git-2.49.0-doc" + } + ], + "store_path": "/nix/store/bqk89pw1wmjzrqi20vqz194ylfhl5cnm-git-2.49.0" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/38kaic6dax0nkj4xwnyysmlwzdlrfdfr-git-2.49.0", + "default": true + }, + { + "name": "doc", + "path": "/nix/store/0544ir9xg154jsb00i0881ggpafyw4nc-git-2.49.0-doc" + } + ], + "store_path": "/nix/store/38kaic6dax0nkj4xwnyysmlwzdlrfdfr-git-2.49.0" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/805a5wv1cyah5awij184yfad1ksmbh9f-git-2.49.0", + "default": true + }, + { + "name": "debug", + "path": "/nix/store/6nibw5w4xay921qx7lp74bs10qsqp0g9-git-2.49.0-debug" + }, + { + "name": "doc", + "path": "/nix/store/7dfxlvdhr5g57b1v8gxwpa2gs7i9g3y5-git-2.49.0-doc" + } + ], + "store_path": "/nix/store/805a5wv1cyah5awij184yfad1ksmbh9f-git-2.49.0" + } + } + }, + "github:NixOS/nixpkgs/nixpkgs-unstable": { + "last_modified": "2025-06-01T15:36:18Z", + "resolved": "github:NixOS/nixpkgs/5929de975bcf4c7c8d8b5ca65c8cd9ef9e44523e?lastModified=1748792178&narHash=sha256-BHmgfHlCJVNisJShVaEmfDIr%2FIp58i%2F4oFGlD1iK6lk%3D" + }, + "gnumake@latest": { + "last_modified": "2025-06-13T00:58:23Z", + "resolved": "github:NixOS/nixpkgs/6e7721e37bf00fa7ea44ac3cfc9d2411284ec3ef#gnumake", + "source": "devbox-search", + "version": "4.4.1", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/wkq7f52a2xq4n24f545wy2fidm4z14f2-gnumake-4.4.1", + "default": true + }, + { + "name": "man", + "path": "/nix/store/x59n9rzr26vf9cr0aapfakhrqhg7vy18-gnumake-4.4.1-man", + "default": true + }, + { + "name": "info", + "path": "/nix/store/4ykdx0lpl2dn8knnab0bap11prr7zzky-gnumake-4.4.1-info" + } + ], + "store_path": "/nix/store/wkq7f52a2xq4n24f545wy2fidm4z14f2-gnumake-4.4.1" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/946sh8bs8hrlrb4jhwxqzllr37zb2q0y-gnumake-4.4.1", + "default": true + }, + { + "name": "man", + "path": "/nix/store/f6b4ph7wflz6ylw3lylbiqrr72xs9jw5-gnumake-4.4.1-man", + "default": true + }, + { + "name": "info", + "path": "/nix/store/8wcb953rsjvp2ybi7iig6hjls48w87dj-gnumake-4.4.1-info" + }, + { + "name": "debug", + "path": "/nix/store/wwhf09gg8ddpl4c6mx70pk3r3a6qx95r-gnumake-4.4.1-debug" + } + ], + "store_path": "/nix/store/946sh8bs8hrlrb4jhwxqzllr37zb2q0y-gnumake-4.4.1" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/1fd85ai3984ah9cy31c7m1fn6i2mm66s-gnumake-4.4.1", + "default": true + }, + { + "name": "man", + "path": "/nix/store/22x6iviphcn6zlbvhihbvws00iavf9aj-gnumake-4.4.1-man", + "default": true + }, + { + "name": "info", + "path": "/nix/store/14vf2zb0z70c67k2nzyqaz8b9rfjy73r-gnumake-4.4.1-info" + } + ], + "store_path": "/nix/store/1fd85ai3984ah9cy31c7m1fn6i2mm66s-gnumake-4.4.1" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/p7z72c2s722pbw31jmm3y0nwypksb5fj-gnumake-4.4.1", + "default": true + }, + { + "name": "man", + "path": "/nix/store/5g01b5r1dbk91kwy4jld5vc1asy0mir4-gnumake-4.4.1-man", + "default": true + }, + { + "name": "debug", + "path": "/nix/store/c59bxh8h9rnpp3l7y8i8zirpvp703z8w-gnumake-4.4.1-debug" + }, + { + "name": "info", + "path": "/nix/store/xqygkvkp7cghyk66aivysnr88q24dsms-gnumake-4.4.1-info" + } + ], + "store_path": "/nix/store/p7z72c2s722pbw31jmm3y0nwypksb5fj-gnumake-4.4.1" + } + } + }, + "go@1.24": { + "last_modified": "2025-05-16T20:19:48Z", + "resolved": "github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3#go", + "source": "devbox-search", + "version": "1.24.3", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/ps3admpzmc1ryvn9q7sw5xfd94dkrb3f-go-1.24.3", + "default": true + } + ], + "store_path": "/nix/store/ps3admpzmc1ryvn9q7sw5xfd94dkrb3f-go-1.24.3" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/45bnqhyyq40p91k3cjw0farx3hn1swx6-go-1.24.3", + "default": true + } + ], + "store_path": "/nix/store/45bnqhyyq40p91k3cjw0farx3hn1swx6-go-1.24.3" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/9z2kb6hxij7pqi0fgcn9ijhpb7ajpazs-go-1.24.3", + "default": true + } + ], + "store_path": "/nix/store/9z2kb6hxij7pqi0fgcn9ijhpb7ajpazs-go-1.24.3" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/5xvi25nqmbrg58aixp4zgczilfnp7pwg-go-1.24.3", + "default": true + } + ], + "store_path": "/nix/store/5xvi25nqmbrg58aixp4zgczilfnp7pwg-go-1.24.3" + } + } + }, + "hugo@latest": { + "last_modified": "2025-11-15T07:28:48Z", + "resolved": "github:NixOS/nixpkgs/1d4c88323ac36805d09657d13a5273aea1b34f0c#hugo", + "source": "devbox-search", + "version": "0.152.2", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/ffwc0ihw2gmk950f041v011c1rkwr8dr-hugo-0.152.2", + "default": true + } + ], + "store_path": "/nix/store/ffwc0ihw2gmk950f041v011c1rkwr8dr-hugo-0.152.2" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/4pj1hv6v5k0j5mayqj4f1q7yxr1vbdcb-hugo-0.152.2", + "default": true + } + ], + "store_path": "/nix/store/4pj1hv6v5k0j5mayqj4f1q7yxr1vbdcb-hugo-0.152.2" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/gzx6d1x75bw629sfjnrahqwprbrd0r00-hugo-0.152.2", + "default": true + } + ], + "store_path": "/nix/store/gzx6d1x75bw629sfjnrahqwprbrd0r00-hugo-0.152.2" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/kfcgbikx8098cdyx8djgq88inmis16xk-hugo-0.152.2", + "default": true + } + ], + "store_path": "/nix/store/kfcgbikx8098cdyx8djgq88inmis16xk-hugo-0.152.2" + } + } + }, + "kubernetes-helm@latest": { + "last_modified": "2025-05-16T20:19:48Z", + "resolved": "github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3#kubernetes-helm", + "source": "devbox-search", + "version": "3.17.3", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/mg9rya9swd6lymmarlgjmx2m037ydngc-kubernetes-helm-3.17.3", + "default": true + } + ], + "store_path": "/nix/store/mg9rya9swd6lymmarlgjmx2m037ydngc-kubernetes-helm-3.17.3" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/kd9x5i47ydamzw514a6lc6r1i0ybiygn-kubernetes-helm-3.17.3", + "default": true + } + ], + "store_path": "/nix/store/kd9x5i47ydamzw514a6lc6r1i0ybiygn-kubernetes-helm-3.17.3" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/kiy0fscxlhdyy1v7rj290g0vbwa62m3i-kubernetes-helm-3.17.3", + "default": true + } + ], + "store_path": "/nix/store/kiy0fscxlhdyy1v7rj290g0vbwa62m3i-kubernetes-helm-3.17.3" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/z8fh9w8y3hlckw7zqi29hgfz0x5gyi0s-kubernetes-helm-3.17.3", + "default": true + } + ], + "store_path": "/nix/store/z8fh9w8y3hlckw7zqi29hgfz0x5gyi0s-kubernetes-helm-3.17.3" + } + } + } + } +}