codefresh 0.78.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +14 -0
- package/.eslintrc.js +20 -0
- package/.gitattributes +29 -0
- package/.nvmrc +1 -0
- package/Dockerfile +39 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/__mocks__/requestretry.js +35 -0
- package/brew/template.rb +15 -0
- package/check-version.js +13 -0
- package/cli.gif +0 -0
- package/codefresh-arm.yml +54 -0
- package/codefresh-release.yml +173 -0
- package/codefresh.yml +120 -0
- package/docs/archetypes/default.md +6 -0
- package/docs/config.toml +44 -0
- package/docs/content/_header.md +6 -0
- package/docs/content/_index.md +19 -0
- package/docs/content/contexts/spec/_index.md +28 -0
- package/docs/content/contexts/spec/config.md +30 -0
- package/docs/content/contexts/spec/helm-repository.md +16 -0
- package/docs/content/contexts/spec/secret-yaml.md +32 -0
- package/docs/content/contexts/spec/secret.md +30 -0
- package/docs/content/contexts/spec/yaml.md +30 -0
- package/docs/content/external-resources.md +8 -0
- package/docs/content/getting-started/_index.md +28 -0
- package/docs/content/installation/_index.md +13 -0
- package/docs/content/installation/docker.md +15 -0
- package/docs/content/installation/homebrew.md +29 -0
- package/docs/content/installation/npm.md +22 -0
- package/docs/content/installation/yarn.md +22 -0
- package/docs/content/more/_index.md +7 -0
- package/docs/content/operate on resources/_index.md +10 -0
- package/docs/content/pipelines/Run Pipeline.md +38 -0
- package/docs/content/pipelines/spec.md +190 -0
- package/docs/docs.spec.js +8 -0
- package/docs/index.js +407 -0
- package/docs/layouts/partials/menu-footer.html +13 -0
- package/docs/themes/docdock/LICENSE.md +22 -0
- package/docs/themes/docdock/README.md +129 -0
- package/docs/themes/docdock/archetypes/default.md +9 -0
- package/docs/themes/docdock/archetypes/slide.md +46 -0
- package/docs/themes/docdock/exampleSite/config.toml +68 -0
- package/docs/themes/docdock/exampleSite/content/_index.md +50 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/_index.md +138 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/customize-style/_index.md +66 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/customize-style/disable.md +24 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/customize-style/theme-variants.md +35 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/customize-style/themestyle.md +25 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/extramenu.md +28 -0
- package/docs/themes/docdock/exampleSite/content/content-organisation/logo.md +12 -0
- package/docs/themes/docdock/exampleSite/content/create-page/_index.md +54 -0
- package/docs/themes/docdock/exampleSite/content/create-page/homepage.md +8 -0
- package/docs/themes/docdock/exampleSite/content/create-page/myslide.md +48 -0
- package/docs/themes/docdock/exampleSite/content/create-page/page-images.md +28 -0
- package/docs/themes/docdock/exampleSite/content/create-page/page-slide.md +114 -0
- package/docs/themes/docdock/exampleSite/content/credits.md +44 -0
- package/docs/themes/docdock/exampleSite/content/getting-start/_index.md +12 -0
- package/docs/themes/docdock/exampleSite/content/getting-start/configuration.md +56 -0
- package/docs/themes/docdock/exampleSite/content/getting-start/installation.md +83 -0
- package/docs/themes/docdock/exampleSite/content/search/_index.md +13 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/_index.md +10 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/alert.md +30 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.files/BachGavotteShort.mp3 +0 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.files/Carroll_AliceAuPaysDesMerveilles.pdf +0 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.files/adivorciarsetoca00cape.pdf +0 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.files/hugo.png +0 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.files/movieselectricsheep-flock-244-32500-2.mp4 +0 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/attachments.md +59 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/button.md +37 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/_index.md +46 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-1/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-2/_index.md +11 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-2/test3.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-3/_index.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/children-4/_index.md +7 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/children/test.md +6 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/excerpt-include.md +25 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/excerpt.md +39 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/expand.md +41 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/icon.md +1254 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/mermaid.md +98 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/notice.md +61 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/panel.md +60 -0
- package/docs/themes/docdock/exampleSite/content/shortcodes/revealjs.md +119 -0
- package/docs/themes/docdock/exampleSite/content/showcase.md +15 -0
- package/docs/themes/docdock/exampleSite/layouts/partials/custom-head.html +10 -0
- package/docs/themes/docdock/exampleSite/layouts/partials/menu-footer.html +13 -0
- package/docs/themes/docdock/exampleSite/layouts/shortcodes/ghcontributors.html +31 -0
- package/docs/themes/docdock/exampleSite/static/menu-entry-icon.png +0 -0
- package/docs/themes/docdock/exampleSite/static/showcase/bitfan.site.png +0 -0
- package/docs/themes/docdock/exampleSite/static/showcase/invincible.site.png +0 -0
- package/docs/themes/docdock/exampleSite/static/style-flex.png +0 -0
- package/docs/themes/docdock/exampleSite/static/style-original.png +0 -0
- package/docs/themes/docdock/exampleSite/static/variant-gold.png +0 -0
- package/docs/themes/docdock/exampleSite/static/variant-gray.png +0 -0
- package/docs/themes/docdock/exampleSite/static/variant-green.png +0 -0
- package/docs/themes/docdock/i18n/en.toml +44 -0
- package/docs/themes/docdock/i18n/es.toml +26 -0
- package/docs/themes/docdock/i18n/fr.toml +44 -0
- package/docs/themes/docdock/i18n/nb.toml +38 -0
- package/docs/themes/docdock/images/screenshot.png +0 -0
- package/docs/themes/docdock/images/tn.png +0 -0
- package/docs/themes/docdock/layouts/404.html +39 -0
- package/docs/themes/docdock/layouts/_default/baseof.html +32 -0
- package/docs/themes/docdock/layouts/_default/li.html +22 -0
- package/docs/themes/docdock/layouts/_default/list.html +20 -0
- package/docs/themes/docdock/layouts/_default/single.html +3 -0
- package/docs/themes/docdock/layouts/index.html +30 -0
- package/docs/themes/docdock/layouts/index.json +12 -0
- package/docs/themes/docdock/layouts/partials/breadcrumb.html +8 -0
- package/docs/themes/docdock/layouts/partials/custom-content-footer.html +6 -0
- package/docs/themes/docdock/layouts/partials/custom-footer.html +0 -0
- package/docs/themes/docdock/layouts/partials/custom-head.html +2 -0
- package/docs/themes/docdock/layouts/partials/flex/body-aftercontent.html +54 -0
- package/docs/themes/docdock/layouts/partials/flex/body-beforecontent.html +68 -0
- package/docs/themes/docdock/layouts/partials/flex/head.html +17 -0
- package/docs/themes/docdock/layouts/partials/flex/scripts.html +11 -0
- package/docs/themes/docdock/layouts/partials/flex/selectnavigation.html +58 -0
- package/docs/themes/docdock/layouts/partials/header.html +10 -0
- package/docs/themes/docdock/layouts/partials/language-selector.html +18 -0
- package/docs/themes/docdock/layouts/partials/menu-footer.html +0 -0
- package/docs/themes/docdock/layouts/partials/menu.html +82 -0
- package/docs/themes/docdock/layouts/partials/next-prev-page.html +44 -0
- package/docs/themes/docdock/layouts/partials/original/body-aftercontent.html +13 -0
- package/docs/themes/docdock/layouts/partials/original/body-beforecontent.html +128 -0
- package/docs/themes/docdock/layouts/partials/original/head.html +23 -0
- package/docs/themes/docdock/layouts/partials/original/scripts.html +10 -0
- package/docs/themes/docdock/layouts/partials/pagination.html +9 -0
- package/docs/themes/docdock/layouts/shortcodes/alert.html +6 -0
- package/docs/themes/docdock/layouts/shortcodes/anchor.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/anchorlink.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/attachmentlink.html +5 -0
- package/docs/themes/docdock/layouts/shortcodes/attachments.html +33 -0
- package/docs/themes/docdock/layouts/shortcodes/button.html +6 -0
- package/docs/themes/docdock/layouts/shortcodes/children.html +104 -0
- package/docs/themes/docdock/layouts/shortcodes/code.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/emoticon.html +29 -0
- package/docs/themes/docdock/layouts/shortcodes/excerpt-include.html +14 -0
- package/docs/themes/docdock/layouts/shortcodes/excerpt.html +7 -0
- package/docs/themes/docdock/layouts/shortcodes/expand.html +16 -0
- package/docs/themes/docdock/layouts/shortcodes/header.html +16 -0
- package/docs/themes/docdock/layouts/shortcodes/icon.html +13 -0
- package/docs/themes/docdock/layouts/shortcodes/image.html +5 -0
- package/docs/themes/docdock/layouts/shortcodes/info.html +10 -0
- package/docs/themes/docdock/layouts/shortcodes/label.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/mermaid.html +3 -0
- package/docs/themes/docdock/layouts/shortcodes/note.html +4 -0
- package/docs/themes/docdock/layouts/shortcodes/notice.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/pagelink.html +12 -0
- package/docs/themes/docdock/layouts/shortcodes/pagetreesearch.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/panel.html +5 -0
- package/docs/themes/docdock/layouts/shortcodes/recently-updated.html +7 -0
- package/docs/themes/docdock/layouts/shortcodes/relref.html +14 -0
- package/docs/themes/docdock/layouts/shortcodes/revealjs.html +66 -0
- package/docs/themes/docdock/layouts/shortcodes/section.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/task.html +10 -0
- package/docs/themes/docdock/layouts/shortcodes/tasklist.html +4 -0
- package/docs/themes/docdock/layouts/shortcodes/tip.html +10 -0
- package/docs/themes/docdock/layouts/shortcodes/toc.html +2 -0
- package/docs/themes/docdock/layouts/shortcodes/unknow.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/userlink.html +1 -0
- package/docs/themes/docdock/layouts/shortcodes/viewppt.html +5 -0
- package/docs/themes/docdock/layouts/shortcodes/viewxls.html +5 -0
- package/docs/themes/docdock/layouts/shortcodes/warning.html +12 -0
- package/docs/themes/docdock/layouts/shortcodes/well.html +1 -0
- package/docs/themes/docdock/layouts/slide/single.html +38 -0
- package/docs/themes/docdock/static/css/auto-complete.css +49 -0
- package/docs/themes/docdock/static/css/bootstrap.min.css +1884 -0
- package/docs/themes/docdock/static/css/featherlight.min.css +8 -0
- package/docs/themes/docdock/static/css/font-awesome.min.css +4 -0
- package/docs/themes/docdock/static/css/horsey.css +35 -0
- package/docs/themes/docdock/static/css/hybrid.css +102 -0
- package/docs/themes/docdock/static/css/nucleus.css +617 -0
- package/docs/themes/docdock/static/fonts/FontAwesome.otf +0 -0
- package/docs/themes/docdock/static/fonts/Inconsolata.eot +0 -0
- package/docs/themes/docdock/static/fonts/Inconsolata.svg +359 -0
- package/docs/themes/docdock/static/fonts/Inconsolata.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Inconsolata.woff +0 -0
- package/docs/themes/docdock/static/fonts/Lato-Bold.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Lato-Bold.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Lato-Regular.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Lato-Regular.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-Normal-webfont.eot +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-Normal-webfont.svg +1019 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-Normal-webfont.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-Normal-webfont.woff +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-Normal-webfont.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-UltraLight-webfont.eot +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-UltraLight-webfont.svg +918 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-UltraLight-webfont.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-UltraLight-webfont.woff +0 -0
- package/docs/themes/docdock/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Roboto-Italic.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Roboto-Medium.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Roboto-Regular.ttf +0 -0
- package/docs/themes/docdock/static/fonts/RobotoMono-Medium.ttf +0 -0
- package/docs/themes/docdock/static/fonts/RobotoMono-Regular.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_200.eot +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_200.svg +332 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_200.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_200.woff +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_200.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_300.eot +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_300.svg +331 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_300.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_300.woff +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_300.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_500.eot +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_500.svg +333 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_500.ttf +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_500.woff +0 -0
- package/docs/themes/docdock/static/fonts/Work_Sans_500.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/fontawesome-webfont.eot +0 -0
- package/docs/themes/docdock/static/fonts/fontawesome-webfont.svg +2671 -0
- package/docs/themes/docdock/static/fonts/fontawesome-webfont.ttf +0 -0
- package/docs/themes/docdock/static/fonts/fontawesome-webfont.woff +0 -0
- package/docs/themes/docdock/static/fonts/fontawesome-webfont.woff2 +0 -0
- package/docs/themes/docdock/static/fonts/glyphicons-halflings-regular.eot +0 -0
- package/docs/themes/docdock/static/fonts/glyphicons-halflings-regular.svg +288 -0
- package/docs/themes/docdock/static/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/docs/themes/docdock/static/fonts/glyphicons-halflings-regular.woff +0 -0
- package/docs/themes/docdock/static/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/docs/themes/docdock/static/images/clippy.svg +4 -0
- package/docs/themes/docdock/static/images/favicon.png +0 -0
- package/docs/themes/docdock/static/images/gopher-404.jpg +0 -0
- package/docs/themes/docdock/static/js/auto-complete.js +223 -0
- package/docs/themes/docdock/static/js/clipboard.min.js +7 -0
- package/docs/themes/docdock/static/js/docdock.js +309 -0
- package/docs/themes/docdock/static/js/featherlight.min.js +8 -0
- package/docs/themes/docdock/static/js/highlight.pack.js +2 -0
- package/docs/themes/docdock/static/js/html5shiv-printshiv.min.js +4 -0
- package/docs/themes/docdock/static/js/jquery-2.x.min.js +4 -0
- package/docs/themes/docdock/static/js/lunr.min.js +6 -0
- package/docs/themes/docdock/static/js/modernizr.custom.71422.js +4 -0
- package/docs/themes/docdock/static/js/search.js +91 -0
- package/docs/themes/docdock/static/mermaid/mermaid.css +273 -0
- package/docs/themes/docdock/static/mermaid/mermaid.dark.css +275 -0
- package/docs/themes/docdock/static/mermaid/mermaid.forest.css +353 -0
- package/docs/themes/docdock/static/mermaid/mermaid.js +30 -0
- package/docs/themes/docdock/static/none.html +0 -0
- package/docs/themes/docdock/static/revealjs/.travis.yml +5 -0
- package/docs/themes/docdock/static/revealjs/CONTRIBUTING.md +23 -0
- package/docs/themes/docdock/static/revealjs/Gruntfile.js +192 -0
- package/docs/themes/docdock/static/revealjs/LICENSE +19 -0
- package/docs/themes/docdock/static/revealjs/README.md +1238 -0
- package/docs/themes/docdock/static/revealjs/bower.json +27 -0
- package/docs/themes/docdock/static/revealjs/css/print/paper.css +203 -0
- package/docs/themes/docdock/static/revealjs/css/print/pdf.css +178 -0
- package/docs/themes/docdock/static/revealjs/css/reveal.css +1555 -0
- package/docs/themes/docdock/static/revealjs/css/reveal.scss +1717 -0
- package/docs/themes/docdock/static/revealjs/css/theme/README.md +21 -0
- package/docs/themes/docdock/static/revealjs/css/theme/beige.css +268 -0
- package/docs/themes/docdock/static/revealjs/css/theme/black.css +264 -0
- package/docs/themes/docdock/static/revealjs/css/theme/blood.css +287 -0
- package/docs/themes/docdock/static/revealjs/css/theme/league.css +270 -0
- package/docs/themes/docdock/static/revealjs/css/theme/moon.css +268 -0
- package/docs/themes/docdock/static/revealjs/css/theme/night.css +262 -0
- package/docs/themes/docdock/static/revealjs/css/theme/serif.css +264 -0
- package/docs/themes/docdock/static/revealjs/css/theme/simple.css +267 -0
- package/docs/themes/docdock/static/revealjs/css/theme/sky.css +271 -0
- package/docs/themes/docdock/static/revealjs/css/theme/solarized.css +268 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/beige.scss +39 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/black.scss +49 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/blood.scss +78 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/league.scss +34 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/moon.scss +57 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/night.scss +34 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/serif.scss +35 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/simple.scss +43 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/sky.scss +46 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/solarized.scss +63 -0
- package/docs/themes/docdock/static/revealjs/css/theme/source/white.scss +49 -0
- package/docs/themes/docdock/static/revealjs/css/theme/template/mixins.scss +29 -0
- package/docs/themes/docdock/static/revealjs/css/theme/template/settings.scss +43 -0
- package/docs/themes/docdock/static/revealjs/css/theme/template/theme.scss +316 -0
- package/docs/themes/docdock/static/revealjs/css/theme/white.css +264 -0
- package/docs/themes/docdock/static/revealjs/demo.html +410 -0
- package/docs/themes/docdock/static/revealjs/index.html +49 -0
- package/docs/themes/docdock/static/revealjs/js/reveal.js +5239 -0
- package/docs/themes/docdock/static/revealjs/lib/css/zenburn.css +80 -0
- package/docs/themes/docdock/static/revealjs/lib/font/league-gothic/LICENSE +2 -0
- package/docs/themes/docdock/static/revealjs/lib/font/league-gothic/league-gothic.css +10 -0
- package/docs/themes/docdock/static/revealjs/lib/font/league-gothic/league-gothic.eot +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/league-gothic/league-gothic.ttf +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/league-gothic/league-gothic.woff +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/LICENSE +45 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- package/docs/themes/docdock/static/revealjs/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- package/docs/themes/docdock/static/revealjs/lib/js/classList.js +2 -0
- package/docs/themes/docdock/static/revealjs/lib/js/head.min.js +9 -0
- package/docs/themes/docdock/static/revealjs/lib/js/html5shiv.js +7 -0
- package/docs/themes/docdock/static/revealjs/package.json +43 -0
- package/docs/themes/docdock/static/revealjs/plugin/highlight/highlight.js +77 -0
- package/docs/themes/docdock/static/revealjs/plugin/markdown/example.html +129 -0
- package/docs/themes/docdock/static/revealjs/plugin/markdown/example.md +31 -0
- package/docs/themes/docdock/static/revealjs/plugin/markdown/markdown.js +412 -0
- package/docs/themes/docdock/static/revealjs/plugin/markdown/marked.js +6 -0
- package/docs/themes/docdock/static/revealjs/plugin/math/math.js +67 -0
- package/docs/themes/docdock/static/revealjs/plugin/multiplex/client.js +13 -0
- package/docs/themes/docdock/static/revealjs/plugin/multiplex/index.js +64 -0
- package/docs/themes/docdock/static/revealjs/plugin/multiplex/master.js +34 -0
- package/docs/themes/docdock/static/revealjs/plugin/multiplex/package.json +19 -0
- package/docs/themes/docdock/static/revealjs/plugin/notes/notes.html +759 -0
- package/docs/themes/docdock/static/revealjs/plugin/notes/notes.js +155 -0
- package/docs/themes/docdock/static/revealjs/plugin/notes-server/client.js +65 -0
- package/docs/themes/docdock/static/revealjs/plugin/notes-server/index.js +69 -0
- package/docs/themes/docdock/static/revealjs/plugin/notes-server/notes.html +585 -0
- package/docs/themes/docdock/static/revealjs/plugin/print-pdf/print-pdf.js +69 -0
- package/docs/themes/docdock/static/revealjs/plugin/search/search.js +206 -0
- package/docs/themes/docdock/static/revealjs/plugin/zoom-js/zoom.js +272 -0
- package/docs/themes/docdock/static/revealjs/test/examples/assets/image1.png +0 -0
- package/docs/themes/docdock/static/revealjs/test/examples/assets/image2.png +0 -0
- package/docs/themes/docdock/static/revealjs/test/examples/barebones.html +41 -0
- package/docs/themes/docdock/static/revealjs/test/examples/embedded-media.html +49 -0
- package/docs/themes/docdock/static/revealjs/test/examples/math.html +185 -0
- package/docs/themes/docdock/static/revealjs/test/examples/slide-backgrounds.html +144 -0
- package/docs/themes/docdock/static/revealjs/test/examples/slide-transitions.html +101 -0
- package/docs/themes/docdock/static/revealjs/test/qunit-1.12.0.css +244 -0
- package/docs/themes/docdock/static/revealjs/test/qunit-1.12.0.js +2212 -0
- package/docs/themes/docdock/static/revealjs/test/simple.md +12 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-element-attributes.html +134 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-element-attributes.js +46 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-external.html +36 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-external.js +24 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-options.html +41 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-options.js +26 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-slide-attributes.html +128 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown-slide-attributes.js +47 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown.html +52 -0
- package/docs/themes/docdock/static/revealjs/test/test-markdown.js +15 -0
- package/docs/themes/docdock/static/revealjs/test/test-pdf.html +83 -0
- package/docs/themes/docdock/static/revealjs/test/test-pdf.js +15 -0
- package/docs/themes/docdock/static/revealjs/test/test.html +86 -0
- package/docs/themes/docdock/static/revealjs/test/test.js +597 -0
- package/docs/themes/docdock/static/scss/flex/article.scss +356 -0
- package/docs/themes/docdock/static/scss/flex/fonts.scss +38 -0
- package/docs/themes/docdock/static/scss/flex/footer.scss +45 -0
- package/docs/themes/docdock/static/scss/flex/header.scss +89 -0
- package/docs/themes/docdock/static/scss/flex/main.scss +164 -0
- package/docs/themes/docdock/static/scss/flex/medias.scss +74 -0
- package/docs/themes/docdock/static/scss/flex/menu.scss +126 -0
- package/docs/themes/docdock/static/scss/flex/shortcode.children.scss +34 -0
- package/docs/themes/docdock/static/scss/flex/shortcode.notice.scss +63 -0
- package/docs/themes/docdock/static/scss/flex/style.scss +14 -0
- package/docs/themes/docdock/static/scss/original/_colours.scss +14 -0
- package/docs/themes/docdock/static/scss/original/_functions.scss +89 -0
- package/docs/themes/docdock/static/scss/original/_variables.scss +137 -0
- package/docs/themes/docdock/static/scss/original/fonts.scss +23 -0
- package/docs/themes/docdock/static/scss/original/main.scss +1233 -0
- package/docs/themes/docdock/static/scss/original/print.scss +29 -0
- package/docs/themes/docdock/static/scss/original/responsive.scss +124 -0
- package/docs/themes/docdock/static/scss/original/shortcodes.scss +32 -0
- package/docs/themes/docdock/static/scss/original/sidebar.scss +276 -0
- package/docs/themes/docdock/static/scss/original/style.scss +16 -0
- package/docs/themes/docdock/static/theme-flex/ribbon.png +0 -0
- package/docs/themes/docdock/static/theme-flex/script.js +277 -0
- package/docs/themes/docdock/static/theme-flex/style.css +728 -0
- package/docs/themes/docdock/static/theme-original/script.js +133 -0
- package/docs/themes/docdock/static/theme-original/style.css +1411 -0
- package/docs/themes/docdock/static/theme-original/variant-blue.css +0 -0
- package/docs/themes/docdock/static/theme-original/variant-gold.css +61 -0
- package/docs/themes/docdock/static/theme-original/variant-gray.css +61 -0
- package/docs/themes/docdock/static/theme-original/variant-green.css +61 -0
- package/docs/themes/docdock/theme.toml +22 -0
- package/lib/binary/components.js +77 -0
- package/lib/binary/downloader.js +170 -0
- package/lib/binary/index.js +11 -0
- package/lib/binary/runner.js +30 -0
- package/lib/interface/cli/Command.js +331 -0
- package/lib/interface/cli/codefresh +24 -0
- package/lib/interface/cli/commad-line-interface.js +90 -0
- package/lib/interface/cli/commands/agent/apply.cmd.js +61 -0
- package/lib/interface/cli/commands/agent/create.cmd.js +39 -0
- package/lib/interface/cli/commands/agent/delete.cmd.js +40 -0
- package/lib/interface/cli/commands/agent/get.cmd.js +44 -0
- package/lib/interface/cli/commands/agent/helper.js +28 -0
- package/lib/interface/cli/commands/agent/install.cmd.js +205 -0
- package/lib/interface/cli/commands/agent/uninstall.cmd.js +92 -0
- package/lib/interface/cli/commands/analyzer/analyze.cmd.js +34 -0
- package/lib/interface/cli/commands/analyzer/analyzer.logic.js +24 -0
- package/lib/interface/cli/commands/annotation/annotation.logic.js +59 -0
- package/lib/interface/cli/commands/annotation/annotation.sdk.spec.js +64 -0
- package/lib/interface/cli/commands/annotation/create.cmd.js +39 -0
- package/lib/interface/cli/commands/annotation/delete.cmd.js +38 -0
- package/lib/interface/cli/commands/annotation/get.cmd.js +42 -0
- package/lib/interface/cli/commands/app-proxy/helper.js +63 -0
- package/lib/interface/cli/commands/app-proxy/install.cmd.js +204 -0
- package/lib/interface/cli/commands/app-proxy/uninstall.cmd.js +175 -0
- package/lib/interface/cli/commands/app-proxy/upgrade.cmd.js +110 -0
- package/lib/interface/cli/commands/audit/download.cmd.js +57 -0
- package/lib/interface/cli/commands/auth/create-context.cmd.js +54 -0
- package/lib/interface/cli/commands/auth/current-context.cmd.js +25 -0
- package/lib/interface/cli/commands/auth/get-contexts.cmd.js +27 -0
- package/lib/interface/cli/commands/auth/use-context.cmd.js +42 -0
- package/lib/interface/cli/commands/board/apply.cmd.js +61 -0
- package/lib/interface/cli/commands/board/board.sdk.spec.js +87 -0
- package/lib/interface/cli/commands/board/create.cmd.js +33 -0
- package/lib/interface/cli/commands/board/delete.cmd.js +42 -0
- package/lib/interface/cli/commands/board/get.cmd.js +62 -0
- package/lib/interface/cli/commands/cli-config/cli-config.cmd.js +41 -0
- package/lib/interface/cli/commands/cli-config/ops/get.cmd.js +52 -0
- package/lib/interface/cli/commands/cli-config/ops/help.cmd.js +36 -0
- package/lib/interface/cli/commands/cli-config/ops/profile.cmd.js +49 -0
- package/lib/interface/cli/commands/cli-config/ops/set.cmd.js +65 -0
- package/lib/interface/cli/commands/cluster/cluster.sdk.spec.js +61 -0
- package/lib/interface/cli/commands/cluster/create.cmd.js +85 -0
- package/lib/interface/cli/commands/cluster/delete.cmd.js +39 -0
- package/lib/interface/cli/commands/cluster/get.cmd.js +30 -0
- package/lib/interface/cli/commands/completion/bash.sh.hbs +27 -0
- package/lib/interface/cli/commands/completion/completion.cmd.js +66 -0
- package/lib/interface/cli/commands/completion/zsh.sh.hbs +20 -0
- package/lib/interface/cli/commands/components/update.cmd.js +30 -0
- package/lib/interface/cli/commands/composition/composition.sdk.spec.js +95 -0
- package/lib/interface/cli/commands/composition/create.cmd.js +67 -0
- package/lib/interface/cli/commands/composition/create.completion.js +15 -0
- package/lib/interface/cli/commands/composition/delete.cmd.js +40 -0
- package/lib/interface/cli/commands/composition/get.cmd.js +43 -0
- package/lib/interface/cli/commands/composition/replace.cmd.js +76 -0
- package/lib/interface/cli/commands/composition/replace.completion.js +15 -0
- package/lib/interface/cli/commands/context/apply.cmd.js +51 -0
- package/lib/interface/cli/commands/context/context.sdk.spec.js +158 -0
- package/lib/interface/cli/commands/context/create/createConfig.cmd.js +54 -0
- package/lib/interface/cli/commands/context/create/createSecret.cmd.js +54 -0
- package/lib/interface/cli/commands/context/create/createSecretYaml.cmd.js +53 -0
- package/lib/interface/cli/commands/context/create/createYaml.cmd.js +53 -0
- package/lib/interface/cli/commands/context/create/git/base.cmd.js +38 -0
- package/lib/interface/cli/commands/context/create/git/types/bitbucket.cmd.js +64 -0
- package/lib/interface/cli/commands/context/create/git/types/github.cmd.js +79 -0
- package/lib/interface/cli/commands/context/create/git/types/gitlab.cmd.js +71 -0
- package/lib/interface/cli/commands/context/create/git/types/stash.cmd.js +69 -0
- package/lib/interface/cli/commands/context/create/helm-repo/base.cmd.js +24 -0
- package/lib/interface/cli/commands/context/create/helm-repo/types/http.cmd.js +60 -0
- package/lib/interface/cli/commands/context/create/helm-repo/types/s3.cmd.js +97 -0
- package/lib/interface/cli/commands/context/create/secret-store/base.cmd.js +33 -0
- package/lib/interface/cli/commands/context/create/secret-store/types/hashicorp-vault.cmd.js +141 -0
- package/lib/interface/cli/commands/context/create/secret-store/types/kubernetes-runtime.cmd.js +67 -0
- package/lib/interface/cli/commands/context/create/secret-store/types/kubernetes.cmd.js +67 -0
- package/lib/interface/cli/commands/context/create.cmd.js +23 -0
- package/lib/interface/cli/commands/context/delete.cmd.js +39 -0
- package/lib/interface/cli/commands/context/get.cmd.js +68 -0
- package/lib/interface/cli/commands/environment/delete.cmd.js +28 -0
- package/lib/interface/cli/commands/environment/environment.sdk.spec.js +40 -0
- package/lib/interface/cli/commands/environment/get.cmd.js +43 -0
- package/lib/interface/cli/commands/gitops/argocd/install.js +9 -0
- package/lib/interface/cli/commands/gitops/argocd/uninstall.js +11 -0
- package/lib/interface/cli/commands/gitops/argocd/upgrade.js +9 -0
- package/lib/interface/cli/commands/gitops/codefresh/install.js +50 -0
- package/lib/interface/cli/commands/gitops/codefresh/uninstall.js +14 -0
- package/lib/interface/cli/commands/gitops/codefresh/upgrade.js +9 -0
- package/lib/interface/cli/commands/gitops/common/install.js +62 -0
- package/lib/interface/cli/commands/gitops/common/uninstall.js +39 -0
- package/lib/interface/cli/commands/gitops/common/upgrade.js +45 -0
- package/lib/interface/cli/commands/gitops/install.cmd.js +111 -0
- package/lib/interface/cli/commands/gitops/install.spec.js +77 -0
- package/lib/interface/cli/commands/gitops/uninstall.cmd.js +56 -0
- package/lib/interface/cli/commands/gitops/upgrade.cmd.js +56 -0
- package/lib/interface/cli/commands/helm/chart/helm-charts.sdk.spec.js +65 -0
- package/lib/interface/cli/commands/helm/chart/install-chart.cmd.js +103 -0
- package/lib/interface/cli/commands/helm/chart/promote-chart.cmd.js +123 -0
- package/lib/interface/cli/commands/helm/helm.sdk.spec.js +81 -0
- package/lib/interface/cli/commands/helm/release/delete-release.cmd.js +102 -0
- package/lib/interface/cli/commands/helm/release/helm-releases.sdk.spec.js +53 -0
- package/lib/interface/cli/commands/helm/release/rollback-release.cmd.js +87 -0
- package/lib/interface/cli/commands/helm/release/test-release.cmd.js +93 -0
- package/lib/interface/cli/commands/helm/release/util.js +16 -0
- package/lib/interface/cli/commands/helm/repo/apply.cmd.js +54 -0
- package/lib/interface/cli/commands/helm/repo/create.cmd.js +46 -0
- package/lib/interface/cli/commands/helm/repo/delete.cmd.js +37 -0
- package/lib/interface/cli/commands/helm/repo/get.cmd.js +61 -0
- package/lib/interface/cli/commands/helm/repo/helm-repo.sdk.spec.js +58 -0
- package/lib/interface/cli/commands/helm/set-helm-config.cmd.js +93 -0
- package/lib/interface/cli/commands/hybrid/InstallationPlan.js +216 -0
- package/lib/interface/cli/commands/hybrid/delete.cmd.js +336 -0
- package/lib/interface/cli/commands/hybrid/execute-test-pipeline.cmd.js +37 -0
- package/lib/interface/cli/commands/hybrid/helper.js +1122 -0
- package/lib/interface/cli/commands/hybrid/info.cmd.js +27 -0
- package/lib/interface/cli/commands/hybrid/init.cmd.js +958 -0
- package/lib/interface/cli/commands/hybrid/installation-process.js +51 -0
- package/lib/interface/cli/commands/hybrid/key-helper.js +82 -0
- package/lib/interface/cli/commands/hybrid/migration.js +192 -0
- package/lib/interface/cli/commands/hybrid/pipeline-helper.js +71 -0
- package/lib/interface/cli/commands/hybrid/upgrade.cmd.js +195 -0
- package/lib/interface/cli/commands/image/annotate.cmd.js +61 -0
- package/lib/interface/cli/commands/image/get.cmd.js +122 -0
- package/lib/interface/cli/commands/image/image.sdk.spec.js +134 -0
- package/lib/interface/cli/commands/image/tag.cmd.js +50 -0
- package/lib/interface/cli/commands/image/untag.cmd.js +47 -0
- package/lib/interface/cli/commands/imagePullSecret/generate.cmd.js +49 -0
- package/lib/interface/cli/commands/imagePullSecret/imagePullSecret.sdk.spec.js +21 -0
- package/lib/interface/cli/commands/monitor/install.cmd.js +160 -0
- package/lib/interface/cli/commands/monitor/uninstall.cmd.js +78 -0
- package/lib/interface/cli/commands/offline-logs/base.cmd.js +33 -0
- package/lib/interface/cli/commands/offline-logs/ensure-index.cmd.js +44 -0
- package/lib/interface/cli/commands/offline-logs/ensure-index.spec.js +76 -0
- package/lib/interface/cli/commands/offline-logs/offload-to-collection.cmd.js +188 -0
- package/lib/interface/cli/commands/offline-logs/offload-to-file.cmd.js +175 -0
- package/lib/interface/cli/commands/offline-logs/offload-to-file.spec.js +59 -0
- package/lib/interface/cli/commands/offline-logs/utils.js +159 -0
- package/lib/interface/cli/commands/pipeline/delete.cmd.js +31 -0
- package/lib/interface/cli/commands/pipeline/get.cmd.js +125 -0
- package/lib/interface/cli/commands/pipeline/get.completion.js +14 -0
- package/lib/interface/cli/commands/pipeline/pipeline.sdk.spec.js +137 -0
- package/lib/interface/cli/commands/pipeline/run.base.js +153 -0
- package/lib/interface/cli/commands/pipeline/run.cf.js +58 -0
- package/lib/interface/cli/commands/pipeline/run.cmd.js +165 -0
- package/lib/interface/cli/commands/pipeline/run.completion.js +15 -0
- package/lib/interface/cli/commands/pipeline/run.local.js +200 -0
- package/lib/interface/cli/commands/project/apply.cmd.js +92 -0
- package/lib/interface/cli/commands/project/create.cmd.js +70 -0
- package/lib/interface/cli/commands/project/delete.cmd.js +39 -0
- package/lib/interface/cli/commands/project/get.cmd.js +67 -0
- package/lib/interface/cli/commands/project/project.sdk.spec.js +111 -0
- package/lib/interface/cli/commands/registry/create/create.standard.cmd.js +53 -0
- package/lib/interface/cli/commands/registry/create.cmd.js +20 -0
- package/lib/interface/cli/commands/registry/delete.cmd.js +29 -0
- package/lib/interface/cli/commands/registry/get.cmd.js +30 -0
- package/lib/interface/cli/commands/registry/registry.sdk.spec.js +43 -0
- package/lib/interface/cli/commands/repo/add.cmd.js +90 -0
- package/lib/interface/cli/commands/repo/delete.cmd.js +43 -0
- package/lib/interface/cli/commands/repo/get.cmd.js +101 -0
- package/lib/interface/cli/commands/repo/repo.sdk.spec.js +94 -0
- package/lib/interface/cli/commands/root/add.cmd.js +18 -0
- package/lib/interface/cli/commands/root/annotate.cmd.js +17 -0
- package/lib/interface/cli/commands/root/apply.cmd.js +38 -0
- package/lib/interface/cli/commands/root/apply.completion.js +15 -0
- package/lib/interface/cli/commands/root/auth.cmd.js +31 -0
- package/lib/interface/cli/commands/root/components.cmd.js +17 -0
- package/lib/interface/cli/commands/root/create.cmd.js +42 -0
- package/lib/interface/cli/commands/root/create.completion.js +15 -0
- package/lib/interface/cli/commands/root/delete.cmd.js +52 -0
- package/lib/interface/cli/commands/root/delete.completion.js +15 -0
- package/lib/interface/cli/commands/root/diff.cmd.js +38 -0
- package/lib/interface/cli/commands/root/diff.completion.js +15 -0
- package/lib/interface/cli/commands/root/download.cmd.js +18 -0
- package/lib/interface/cli/commands/root/generate.cmd.js +18 -0
- package/lib/interface/cli/commands/root/get.cmd.js +72 -0
- package/lib/interface/cli/commands/root/get.completion.js +19 -0
- package/lib/interface/cli/commands/root/install.cmd.js +17 -0
- package/lib/interface/cli/commands/root/replace.cmd.js +72 -0
- package/lib/interface/cli/commands/root/replace.completion.js +15 -0
- package/lib/interface/cli/commands/root/root.sdk.spec.js +197 -0
- package/lib/interface/cli/commands/root/runner.cmd.js +18 -0
- package/lib/interface/cli/commands/root/synchronize.cmd.js +17 -0
- package/lib/interface/cli/commands/root/uninstall.cmd.js +17 -0
- package/lib/interface/cli/commands/root/upgrade.cmd.js +38 -0
- package/lib/interface/cli/commands/root/validate.cmd.js +119 -0
- package/lib/interface/cli/commands/root/validate.completion.js +10 -0
- package/lib/interface/cli/commands/root/version.cmd.js +48 -0
- package/lib/interface/cli/commands/runtimeEnvironments/apply.cmd.js +111 -0
- package/lib/interface/cli/commands/runtimeEnvironments/attach.cmd.js +161 -0
- package/lib/interface/cli/commands/runtimeEnvironments/create.cmd.js +23 -0
- package/lib/interface/cli/commands/runtimeEnvironments/delete.cmd.js +35 -0
- package/lib/interface/cli/commands/runtimeEnvironments/diff.cmd.js +64 -0
- package/lib/interface/cli/commands/runtimeEnvironments/get.cmd.js +76 -0
- package/lib/interface/cli/commands/runtimeEnvironments/install.cmd.js +312 -0
- package/lib/interface/cli/commands/runtimeEnvironments/runtimeEnvironments.sdk.spec.js +61 -0
- package/lib/interface/cli/commands/runtimeEnvironments/uninstall.cmd.js +149 -0
- package/lib/interface/cli/commands/section/apply.cmd.js +85 -0
- package/lib/interface/cli/commands/section/create.cmd.js +69 -0
- package/lib/interface/cli/commands/section/delete.cmd.js +61 -0
- package/lib/interface/cli/commands/section/get.cmd.js +79 -0
- package/lib/interface/cli/commands/section/section.sdk.spec.js +143 -0
- package/lib/interface/cli/commands/step/delete.cmd.js +30 -0
- package/lib/interface/cli/commands/step/get.cmd.js +131 -0
- package/lib/interface/cli/commands/step/get.completion.js +14 -0
- package/lib/interface/cli/commands/step/step.sdk.spec.js +67 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/apply.cmd.js +69 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/delete.cmd.js +44 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/diff.cmd.js +74 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/get.cmd.js +103 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/systemRuntimeEnvironments.sdk.spec.js +128 -0
- package/lib/interface/cli/commands/team/add.user.cmd.js +39 -0
- package/lib/interface/cli/commands/team/create.cmd.js +53 -0
- package/lib/interface/cli/commands/team/get.cmd.js +30 -0
- package/lib/interface/cli/commands/team/remove.user.cmd.js +39 -0
- package/lib/interface/cli/commands/team/synchronize.cmd.js +76 -0
- package/lib/interface/cli/commands/team/team.sdk.spec.js +65 -0
- package/lib/interface/cli/commands/tokens/apply.cmd.js +50 -0
- package/lib/interface/cli/commands/tokens/create.cmd.js +67 -0
- package/lib/interface/cli/commands/tokens/delete.cmd.js +43 -0
- package/lib/interface/cli/commands/tokens/get.cmd.js +38 -0
- package/lib/interface/cli/commands/tokens/tokens.sdk.spec.js +43 -0
- package/lib/interface/cli/commands/trigger/create.cmd.js +44 -0
- package/lib/interface/cli/commands/trigger/delete.cmd.js +39 -0
- package/lib/interface/cli/commands/trigger/event/create.cmd.js +60 -0
- package/lib/interface/cli/commands/trigger/event/delete.cmd.js +34 -0
- package/lib/interface/cli/commands/trigger/event/get.cmd.js +59 -0
- package/lib/interface/cli/commands/trigger/event/trigger-event.sdk.spec.js +51 -0
- package/lib/interface/cli/commands/trigger/get.cmd.js +47 -0
- package/lib/interface/cli/commands/trigger/trigger.sdk.spec.js +73 -0
- package/lib/interface/cli/commands/trigger/type/get.cmd.js +54 -0
- package/lib/interface/cli/commands/trigger/type/trigger-type.sdk.spec.js +33 -0
- package/lib/interface/cli/commands/workflow/approve.cmd.js +31 -0
- package/lib/interface/cli/commands/workflow/approve.cmd.spec.js +47 -0
- package/lib/interface/cli/commands/workflow/deny.cmd.js +31 -0
- package/lib/interface/cli/commands/workflow/deny.cmd.spec.js +47 -0
- package/lib/interface/cli/commands/workflow/get.cmd.js +161 -0
- package/lib/interface/cli/commands/workflow/logs.cmd.js +38 -0
- package/lib/interface/cli/commands/workflow/restart.cmd.js +37 -0
- package/lib/interface/cli/commands/workflow/terminate.cmd.js +31 -0
- package/lib/interface/cli/commands/workflow/wait.cmd.js +77 -0
- package/lib/interface/cli/commands/workflow/workflow-data-item/create.cmd.js +44 -0
- package/lib/interface/cli/commands/workflow/workflow-data-item/get.cmd.js +72 -0
- package/lib/interface/cli/commands/workflow/workflow.sdk.spec.js +123 -0
- package/lib/interface/cli/completion/completion.spec.js +313 -0
- package/lib/interface/cli/completion/generate +102 -0
- package/lib/interface/cli/completion/helpers.js +90 -0
- package/lib/interface/cli/completion/index.js +89 -0
- package/lib/interface/cli/completion/tree.json +1 -0
- package/lib/interface/cli/defaults.js +18 -0
- package/lib/interface/cli/helpers/auth.js +62 -0
- package/lib/interface/cli/helpers/cli-config.js +110 -0
- package/lib/interface/cli/helpers/entitiesManifests.js +60 -0
- package/lib/interface/cli/helpers/general.js +235 -0
- package/lib/interface/cli/helpers/helm.js +51 -0
- package/lib/interface/cli/helpers/helpers.sdk.spec.js +201 -0
- package/lib/interface/cli/helpers/helpers.unit.spec.js +105 -0
- package/lib/interface/cli/helpers/image.js +66 -0
- package/lib/interface/cli/helpers/kubernetes.js +61 -0
- package/lib/interface/cli/helpers/logs.js +99 -0
- package/lib/interface/cli/helpers/progressEvents.js +25 -0
- package/lib/interface/cli/helpers/sys-re.js +76 -0
- package/lib/interface/cli/helpers/validation.js +92 -0
- package/lib/logic/cli-config/Manager.js +187 -0
- package/lib/logic/cli-config/Model.js +82 -0
- package/lib/logic/cli-config/errors/MultiplePropertiesError.js +8 -0
- package/lib/logic/cli-config/errors/NoPropertyError.js +8 -0
- package/lib/logic/cli-config/errors/NotFullPropertyError.js +8 -0
- package/lib/logic/cli-config/errors/PipelineValidationError.js +12 -0
- package/lib/logic/cli-config/errors/SchemaValidationError.js +14 -0
- package/lib/logic/cli-config/errors/awaitTo.js +16 -0
- package/lib/logic/cli-config/errors/helpers.js +23 -0
- package/lib/logic/cli-config/errors/index.js +13 -0
- package/lib/logic/cli-config/manager.spec.js +152 -0
- package/lib/logic/cli-config/schema.json +61 -0
- package/lib/logic/entities/Agent.js +52 -0
- package/lib/logic/entities/Annotation.js +24 -0
- package/lib/logic/entities/Board.js +22 -0
- package/lib/logic/entities/Cluster.js +22 -0
- package/lib/logic/entities/CodefreshRepo.js +22 -0
- package/lib/logic/entities/Composition.js +22 -0
- package/lib/logic/entities/Context.js +31 -0
- package/lib/logic/entities/Entity.js +48 -0
- package/lib/logic/entities/Environment.js +38 -0
- package/lib/logic/entities/GitRepo.js +21 -0
- package/lib/logic/entities/HelmRepo.js +23 -0
- package/lib/logic/entities/Image.js +13 -0
- package/lib/logic/entities/Pipeline.js +22 -0
- package/lib/logic/entities/Project.js +25 -0
- package/lib/logic/entities/Registry.js +35 -0
- package/lib/logic/entities/RuntimeEnvironments.js +30 -0
- package/lib/logic/entities/Section.js +23 -0
- package/lib/logic/entities/StepType.js +27 -0
- package/lib/logic/entities/StepTypeVersion.js +19 -0
- package/lib/logic/entities/Team.js +36 -0
- package/lib/logic/entities/Token.js +25 -0
- package/lib/logic/entities/Trigger.js +21 -0
- package/lib/logic/entities/TriggerEvent.js +28 -0
- package/lib/logic/entities/TriggerType.js +25 -0
- package/lib/logic/entities/Workflow.js +63 -0
- package/lib/logic/entities/WorkflowDataItem.js +48 -0
- package/lib/logic/index.js +7 -0
- package/lib/logic/sdk/index.js +5 -0
- package/lib/output/Formatter.js +42 -0
- package/lib/output/Output.js +88 -0
- package/lib/output/Style.js +96 -0
- package/lib/output/__mocks__/Output.js +8 -0
- package/lib/output/formatters/Annotations.formatter.js +7 -0
- package/lib/output/formatters/Board.formatter.js +7 -0
- package/lib/output/formatters/CodefreshRepo.formatter.js +7 -0
- package/lib/output/formatters/Composition.formatter.js +8 -0
- package/lib/output/formatters/Environment.formatter.js +17 -0
- package/lib/output/formatters/GitRepo.formatter.js +7 -0
- package/lib/output/formatters/HelmRepo.formatter.js +9 -0
- package/lib/output/formatters/Image.formatter.js +12 -0
- package/lib/output/formatters/Pipeline.formatter.js +8 -0
- package/lib/output/formatters/Project.formatter.js +10 -0
- package/lib/output/formatters/Registry.formatter.js +7 -0
- package/lib/output/formatters/Section.formatter.js +8 -0
- package/lib/output/formatters/StepType.formatter.js +8 -0
- package/lib/output/formatters/Team.formatter.js +13 -0
- package/lib/output/formatters/Token.formatter.js +11 -0
- package/lib/output/formatters/TriggerEvent.formatter.js +12 -0
- package/lib/output/formatters/TriggerType.formatter.js +12 -0
- package/lib/output/formatters/Workflow.formatter.js +28 -0
- package/lib/output/formatters/index.js +38 -0
- package/lib/output/types/id.output.js +16 -0
- package/lib/output/types/json.output.js +22 -0
- package/lib/output/types/name.output.js +16 -0
- package/lib/output/types/table.output.js +107 -0
- package/lib/output/types/table.output.spec.js +93 -0
- package/lib/output/types/yaml.output.js +30 -0
- package/openapi.json +8645 -0
- package/package.json +105 -0
- package/run-check-version.js +3 -0
- package/test-setup.js +34 -0
- package/yarn.lock +6124 -0
|
@@ -0,0 +1,958 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
const Command = require('../../Command');
|
|
5
|
+
const runnerRoot = require('../root/runner.cmd');
|
|
6
|
+
const inquirer = require('inquirer');
|
|
7
|
+
const colors = require('colors');
|
|
8
|
+
const _ = require('lodash');
|
|
9
|
+
const { addProxyVariables, detectProxy, keyValueArrayToObject } = require('../../helpers/general');
|
|
10
|
+
const { getAllKubeContexts, getKubeContext, isInCluster } = require('../../helpers/kubernetes');
|
|
11
|
+
const installMonitoring = require('../monitor/install.cmd');
|
|
12
|
+
const createClusterCmd = require('../cluster/create.cmd');
|
|
13
|
+
const createContext = require('../auth/create-context.cmd');
|
|
14
|
+
const getAgents = require('../agent/get.cmd');
|
|
15
|
+
const { getConfigForSdk } = require('../../commad-line-interface');
|
|
16
|
+
const DEFAULTS = require('../../defaults');
|
|
17
|
+
const sdk = require('../../../../logic/sdk');
|
|
18
|
+
const installationProgress = require('./installation-process');
|
|
19
|
+
const { to } = require('./../../../../logic/cli-config/errors/awaitTo');
|
|
20
|
+
const {
|
|
21
|
+
createErrorHandler,
|
|
22
|
+
drawCodefreshFiglet,
|
|
23
|
+
getDefaultRuntime,
|
|
24
|
+
getRecommendedKubeNamespace,
|
|
25
|
+
runClusterAcceptanceTests,
|
|
26
|
+
installAgent,
|
|
27
|
+
installRuntime,
|
|
28
|
+
installAppProxy,
|
|
29
|
+
attachRuntime,
|
|
30
|
+
newRuntimeName,
|
|
31
|
+
newAgentName,
|
|
32
|
+
keyValueAsStringToObject,
|
|
33
|
+
getRuntimeImagesWithRegistryUrl,
|
|
34
|
+
mergeValuesFromValuesFile,
|
|
35
|
+
INSTALLATION_DEFAULTS,
|
|
36
|
+
} = require('./helper');
|
|
37
|
+
const InstallationPlan = require('./InstallationPlan');
|
|
38
|
+
const { produceVenonaKeys } = require('./key-helper');
|
|
39
|
+
const { array } = require('yargs');
|
|
40
|
+
const {
|
|
41
|
+
addPipelineToInstallationPlan,
|
|
42
|
+
} = require('./pipeline-helper');
|
|
43
|
+
|
|
44
|
+
const defaultDockerRegistry = 'quay.io';
|
|
45
|
+
const handleError = createErrorHandler(`\nIf you had any issues with the installation please report them at: ${colors.blue('https://github.com/codefresh-io/cli/issues/new')}`);
|
|
46
|
+
|
|
47
|
+
async function isNewAccount() {
|
|
48
|
+
const [pipelines, err] = await to(sdk.pipelines.list({}));
|
|
49
|
+
if (!err && _.isArray(_.get(pipelines, 'docs'))) {
|
|
50
|
+
return !pipelines.docs.length;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function printInstallationOptionsSummary({
|
|
57
|
+
kubeContextName,
|
|
58
|
+
kubeNamespace,
|
|
59
|
+
shouldMakeDefaultRe,
|
|
60
|
+
shouldExecutePipeline,
|
|
61
|
+
httpProxy,
|
|
62
|
+
httpsProxy,
|
|
63
|
+
noProxy,
|
|
64
|
+
appProxy,
|
|
65
|
+
appProxyHost,
|
|
66
|
+
appProxyPathPrefix,
|
|
67
|
+
dryRun,
|
|
68
|
+
shouldUseHelm,
|
|
69
|
+
}) {
|
|
70
|
+
let summary = `\n${colors.green('Installation options summary:')}
|
|
71
|
+
1. Kubernetes Context: ${colors.cyan(kubeContextName)}
|
|
72
|
+
2. Kubernetes Namespace: ${colors.cyan(kubeNamespace)}
|
|
73
|
+
3. Set this as default account runtime-environment: ${colors.cyan(!!shouldMakeDefaultRe)}
|
|
74
|
+
4. Execute demo pipeline after install: ${colors.cyan(!!shouldExecutePipeline)}
|
|
75
|
+
5. HTTP proxy: ${httpProxy ? colors.cyan(httpProxy) : 'none'}
|
|
76
|
+
6. HTTPS proxy: ${httpsProxy ? colors.cyan(httpsProxy) : 'none'}
|
|
77
|
+
7. No proxy: ${noProxy ? colors.cyan(noProxy) : 'none'}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
if (appProxy) {
|
|
81
|
+
summary += `7. App-Proxy address: ${colors.cyan(`https://${appProxyHost}${appProxyPathPrefix || ''}`)}\n`;
|
|
82
|
+
}
|
|
83
|
+
if (dryRun) {
|
|
84
|
+
summary += '**** running in dry-run mode ****';
|
|
85
|
+
}
|
|
86
|
+
if (shouldUseHelm) {
|
|
87
|
+
summary += '**** running in helm values generation mode ****';
|
|
88
|
+
}
|
|
89
|
+
console.log(summary);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const initCmd = new Command({
|
|
93
|
+
root: false,
|
|
94
|
+
parent: runnerRoot,
|
|
95
|
+
command: 'init',
|
|
96
|
+
requiresAuthentication: false,
|
|
97
|
+
description: 'Install Codefresh Runner solution\'s components on Kubernetes cluster',
|
|
98
|
+
webDocs: {
|
|
99
|
+
category: 'Runner',
|
|
100
|
+
title: 'Init',
|
|
101
|
+
weight: 100,
|
|
102
|
+
},
|
|
103
|
+
// requiresAuthentication: argv => argv && !argv.token,
|
|
104
|
+
builder: yargs => yargs
|
|
105
|
+
.env('CF_ARG_') // this means that every process.env.CF_ARG_* will be passed to argv
|
|
106
|
+
.option('name', {
|
|
107
|
+
describe: 'Agent\'s name to be created if token is not provided',
|
|
108
|
+
})
|
|
109
|
+
.option('token', {
|
|
110
|
+
describe: 'Registration\'s token',
|
|
111
|
+
})
|
|
112
|
+
.option('url', {
|
|
113
|
+
describe: 'Codefresh system custom url',
|
|
114
|
+
})
|
|
115
|
+
.option('generate-helm-values-file', {
|
|
116
|
+
describe: 'Path to the new generated helm values file',
|
|
117
|
+
type: 'string',
|
|
118
|
+
})
|
|
119
|
+
.option('kube-context-name', {
|
|
120
|
+
describe: 'Name of the Kubernetes context on which runner should be installed [$CF_ARG_KUBE_CONTEXT_NAME]',
|
|
121
|
+
})
|
|
122
|
+
.option('kube-node-selector', {
|
|
123
|
+
describe: 'The Kubernetes node selector "key=value" to be used by runner build resources (default is no node selector) (string)',
|
|
124
|
+
})
|
|
125
|
+
.option('build-node-selector', {
|
|
126
|
+
describe: 'The Kubernetes node selector "key=value" to be used by the Codefresh build resources (default is no node selector)',
|
|
127
|
+
})
|
|
128
|
+
.option('yes', {
|
|
129
|
+
describe: 'Use installation defaults (don\'t ask any questions)',
|
|
130
|
+
alias: 'y',
|
|
131
|
+
type: 'boolean',
|
|
132
|
+
})
|
|
133
|
+
.option('skip-cluster-test', {
|
|
134
|
+
describe: 'Do not test given kubeconfig context to have all the required permission',
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
})
|
|
137
|
+
.option('skip-cluster-integration', {
|
|
138
|
+
describe: 'Do not create a cluster integration in Codefresh',
|
|
139
|
+
type: 'boolean',
|
|
140
|
+
})
|
|
141
|
+
.option('set-default-runtime', {
|
|
142
|
+
describe: 'Set this as the default runtime environment for your Codefresh account',
|
|
143
|
+
type: 'boolean',
|
|
144
|
+
})
|
|
145
|
+
.option('exec-demo-pipeline', {
|
|
146
|
+
describe: 'Run a demo pipeline after the installation completes',
|
|
147
|
+
type: 'boolean',
|
|
148
|
+
})
|
|
149
|
+
.option('install-monitor', {
|
|
150
|
+
describe: 'Install a monitoring component that will help provide valueable data about your cluster to Codefresh',
|
|
151
|
+
type: 'boolean',
|
|
152
|
+
default: true,
|
|
153
|
+
})
|
|
154
|
+
.option('kube-namespace', {
|
|
155
|
+
describe: 'Name of the namespace on which runner should be installed [$CF_ARG_KUBE_NAMESPACE]',
|
|
156
|
+
})
|
|
157
|
+
.option('tolerations', {
|
|
158
|
+
describe: 'The Kubernetes tolerations as path to a JSON file prefixed with @ to be used by runner resources (default is no tolerations) (string)',
|
|
159
|
+
})
|
|
160
|
+
.option('storage-class-name', {
|
|
161
|
+
describe: 'Set a name of your custom storage class',
|
|
162
|
+
})
|
|
163
|
+
.option('docker-registry', {
|
|
164
|
+
describe: `The prefix for the container registry that will be used for pulling the required components images. Example: --docker-registry="docker.io" default is ${defaultDockerRegistry}`,
|
|
165
|
+
type: 'string',
|
|
166
|
+
default: defaultDockerRegistry,
|
|
167
|
+
})
|
|
168
|
+
.option('kube-config-path', {
|
|
169
|
+
describe: 'Path to kubeconfig file (default is $HOME/.kube/config)',
|
|
170
|
+
})
|
|
171
|
+
.option('values', {
|
|
172
|
+
describe: 'specify values in a YAML file (see example here: https://github.com/codefresh-io/venona/blob/release-1.0/venonactl/example/values-example.yaml)',
|
|
173
|
+
})
|
|
174
|
+
.option('set-value', {
|
|
175
|
+
describe: 'Set values for templates, example: --set-value LocalVolumesDir=/mnt/disks/ssd0/codefresh-volumes',
|
|
176
|
+
type: array,
|
|
177
|
+
default: [],
|
|
178
|
+
})
|
|
179
|
+
.option('set-file', {
|
|
180
|
+
describe: 'Set values for templates from file, example: --set-file Storage.GoogleServiceAccount=/path/to/service-account.json',
|
|
181
|
+
type: array,
|
|
182
|
+
default: [],
|
|
183
|
+
})
|
|
184
|
+
.option('http-proxy', {
|
|
185
|
+
describe: 'http proxy to be used in the runner',
|
|
186
|
+
})
|
|
187
|
+
.option('https-proxy', {
|
|
188
|
+
describe: 'https proxy to be used in the runner',
|
|
189
|
+
})
|
|
190
|
+
.option('no-proxy', {
|
|
191
|
+
describe: 'no_proxy to be used in the runner',
|
|
192
|
+
})
|
|
193
|
+
.option('verbose', {
|
|
194
|
+
describe: 'Print logs',
|
|
195
|
+
})
|
|
196
|
+
.option('env-vars', {
|
|
197
|
+
describe: 'Addiontal env vars to be used in all Codefresh components',
|
|
198
|
+
type: array,
|
|
199
|
+
default: [],
|
|
200
|
+
})
|
|
201
|
+
.option('app-proxy', {
|
|
202
|
+
describe: 'install app proxy component (default false)',
|
|
203
|
+
default: false,
|
|
204
|
+
type: 'boolean',
|
|
205
|
+
})
|
|
206
|
+
.option('app-proxy-host', {
|
|
207
|
+
describe: 'the hostname that will be used by the app-proxy ingress',
|
|
208
|
+
type: 'string',
|
|
209
|
+
})
|
|
210
|
+
.option('app-proxy-ingress-class', {
|
|
211
|
+
describe: 'the ingress class that will be used by the app-proxy ingress',
|
|
212
|
+
type: 'string',
|
|
213
|
+
})
|
|
214
|
+
.option('docker-daemon-access', {
|
|
215
|
+
describe: 'docker daemon access (default true)',
|
|
216
|
+
default: true,
|
|
217
|
+
type: 'boolean',
|
|
218
|
+
})
|
|
219
|
+
.option('dry-run', {
|
|
220
|
+
describe: 'Will save all of the manifests to be deployed on the cluster to: ./manifests/',
|
|
221
|
+
default: false,
|
|
222
|
+
type: 'boolean',
|
|
223
|
+
})
|
|
224
|
+
.option('bypass-download', {
|
|
225
|
+
describe: 'Will bypass the attempt to download the installer. Instead, will immediately attempt to use the binary from the components folder',
|
|
226
|
+
default: false,
|
|
227
|
+
type: 'boolean',
|
|
228
|
+
})
|
|
229
|
+
.example(
|
|
230
|
+
'codefresh runner init --values values.yaml',
|
|
231
|
+
'See values file example here: https://github.com/codefresh-io/venona/blob/release-1.0/venonactl/example/values-example.yaml)',
|
|
232
|
+
),
|
|
233
|
+
handler: async (argv) => {
|
|
234
|
+
let resumedInstallation = false;
|
|
235
|
+
|
|
236
|
+
const oldInstallationPlan = InstallationPlan.restorePreviousState();
|
|
237
|
+
if (oldInstallationPlan) {
|
|
238
|
+
console.log(colors.cyan('Previous installation state:'));
|
|
239
|
+
oldInstallationPlan.printState();
|
|
240
|
+
oldInstallationPlan.reset(); // needs to be called after printState()
|
|
241
|
+
const answer = await inquirer.prompt({
|
|
242
|
+
type: 'confirm',
|
|
243
|
+
name: 'resumeInstallation',
|
|
244
|
+
default: INSTALLATION_DEFAULTS.RESUME_OLD_INSTALLATION,
|
|
245
|
+
message: 'Detected previous incomplete installation, do you want to resume this installation?',
|
|
246
|
+
});
|
|
247
|
+
resumedInstallation = answer.resumeInstallation;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
let _argv = argv;
|
|
251
|
+
if (resumedInstallation) {
|
|
252
|
+
_argv = Object.assign(oldInstallationPlan.getContext('argv'), _argv); // restore previous installation environment
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// if we are using a values file
|
|
256
|
+
if (_argv.values) {
|
|
257
|
+
_argv = mergeValuesFromValuesFile(_argv, _argv.values, handleError);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const {
|
|
261
|
+
'kube-node-selector': kubeNodeSelector,
|
|
262
|
+
'build-node-selector': buildNodeSelector,
|
|
263
|
+
tolerations,
|
|
264
|
+
'kube-config-path': kubeConfigPath,
|
|
265
|
+
'storage-class-name': storageClassName,
|
|
266
|
+
verbose,
|
|
267
|
+
values: valuesFile,
|
|
268
|
+
'set-value': setValue,
|
|
269
|
+
'set-file': setFile,
|
|
270
|
+
'app-proxy-ingress-class': appProxyIngressClass,
|
|
271
|
+
'env-vars': envVars,
|
|
272
|
+
yes: noQuestions,
|
|
273
|
+
'skip-cluster-test': skipClusterTest,
|
|
274
|
+
'skip-cluster-integration': skipClusterIntegration,
|
|
275
|
+
'docker-registry': dockerRegistry,
|
|
276
|
+
token,
|
|
277
|
+
name,
|
|
278
|
+
'app-proxy': appProxy,
|
|
279
|
+
'app-proxy-path-prefix': appProxyPathPrefix,
|
|
280
|
+
'install-monitor': installMonitor,
|
|
281
|
+
'docker-daemon-access': dockerDaemonAccess,
|
|
282
|
+
runtimeName,
|
|
283
|
+
reEnvVars,
|
|
284
|
+
reResources,
|
|
285
|
+
reTolerations,
|
|
286
|
+
userVolumeMounts,
|
|
287
|
+
userVolumes,
|
|
288
|
+
'dry-run': dryRun,
|
|
289
|
+
'bypass-download': bypassDownload,
|
|
290
|
+
} = _argv;
|
|
291
|
+
|
|
292
|
+
let {
|
|
293
|
+
'generate-helm-values-file': helmValuesFile,
|
|
294
|
+
'kube-context-name': kubeContextName,
|
|
295
|
+
'kube-namespace': kubeNamespace,
|
|
296
|
+
'set-default-runtime': shouldMakeDefaultRe,
|
|
297
|
+
'exec-demo-pipeline': shouldExecutePipeline,
|
|
298
|
+
'http-proxy': httpProxy,
|
|
299
|
+
'https-proxy': httpsProxy,
|
|
300
|
+
'no-proxy': noProxy,
|
|
301
|
+
'app-proxy-host': appProxyHost,
|
|
302
|
+
url,
|
|
303
|
+
} = _argv;
|
|
304
|
+
|
|
305
|
+
if (!url) {
|
|
306
|
+
url = DEFAULTS.URL;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (helmValuesFile === '') {
|
|
310
|
+
// if the user specified the --generate-helm-values-file flag
|
|
311
|
+
// but did not specify file path, use a default path
|
|
312
|
+
helmValuesFile = INSTALLATION_DEFAULTS.HELM_FILE_PATH;
|
|
313
|
+
}
|
|
314
|
+
const shouldUseHelm = !!helmValuesFile;
|
|
315
|
+
|
|
316
|
+
if (_.get(sdk, 'config.context.isNoAuth') && !token) {
|
|
317
|
+
console.log('Not authenticated as a Codefresh account: ');
|
|
318
|
+
console.log('In order to install a Codefresh Runner you need to provide ' +
|
|
319
|
+
`an authentication token which can be generated here: ${colors.blue(`${_argv.url}/user/settings`)}` +
|
|
320
|
+
'\nAfter getting the token you may run this command again with the [--token] option or use the \'codefresh auth\' command to create an authenticated context.');
|
|
321
|
+
process.exit(1);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const detectedProxyVars = detectProxy();
|
|
325
|
+
httpProxy = httpProxy || detectedProxyVars.httpProxy;
|
|
326
|
+
httpsProxy = httpsProxy || detectedProxyVars.httpsProxy;
|
|
327
|
+
noProxy = noProxy || detectedProxyVars.noProxy;
|
|
328
|
+
|
|
329
|
+
if (noQuestions) {
|
|
330
|
+
// use defaults
|
|
331
|
+
kubeContextName = kubeContextName || getKubeContext(kubeConfigPath);
|
|
332
|
+
kubeNamespace = kubeNamespace || await getRecommendedKubeNamespace(kubeConfigPath, kubeContextName);
|
|
333
|
+
shouldMakeDefaultRe = _.isUndefined(shouldMakeDefaultRe) ? INSTALLATION_DEFAULTS.MAKE_DEFAULT_RE : shouldMakeDefaultRe;
|
|
334
|
+
shouldExecutePipeline = _.isUndefined(shouldExecutePipeline) ? INSTALLATION_DEFAULTS.RUN_DEMO_PIPELINE : shouldExecutePipeline;
|
|
335
|
+
} else if (!resumedInstallation) {
|
|
336
|
+
console.log(colors.green('This installer will guide you through the Codefresh Runner installation process'));
|
|
337
|
+
if (!kubeContextName) {
|
|
338
|
+
const contexts = getAllKubeContexts(kubeConfigPath);
|
|
339
|
+
const currentKubeContext = getKubeContext(kubeConfigPath);
|
|
340
|
+
|
|
341
|
+
const answer = await inquirer.prompt({
|
|
342
|
+
type: 'list',
|
|
343
|
+
name: 'context',
|
|
344
|
+
message: 'Name of Kubernetes context to use',
|
|
345
|
+
default: currentKubeContext,
|
|
346
|
+
choices: contexts,
|
|
347
|
+
});
|
|
348
|
+
kubeContextName = answer.context; // need this to set the default kube namespace in the next question
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const questions = [];
|
|
352
|
+
if (!kubeNamespace) {
|
|
353
|
+
questions.push({
|
|
354
|
+
type: 'input',
|
|
355
|
+
name: 'namespace',
|
|
356
|
+
default: await getRecommendedKubeNamespace(kubeConfigPath, kubeContextName),
|
|
357
|
+
message: 'Kubernetes namespace to install into (will be created if it does not exist)',
|
|
358
|
+
validate: value => (value !== undefined && value !== '') || 'Please enter namespace\'s name',
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
if (httpProxy) {
|
|
362
|
+
questions.push({
|
|
363
|
+
type: 'input',
|
|
364
|
+
name: 'httpProxy',
|
|
365
|
+
default: httpProxy,
|
|
366
|
+
message: 'detected HTTP_PROXY, should I use this in all Codefresh components?',
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (httpsProxy) {
|
|
371
|
+
questions.push({
|
|
372
|
+
type: 'input',
|
|
373
|
+
name: 'httpsProxy',
|
|
374
|
+
default: httpsProxy,
|
|
375
|
+
message: 'detected HTTPS_PROXY, should I use this in all Codefresh components?',
|
|
376
|
+
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
if (noProxy) {
|
|
380
|
+
questions.push({
|
|
381
|
+
type: 'input',
|
|
382
|
+
name: 'noProxy',
|
|
383
|
+
default: noProxy,
|
|
384
|
+
message: 'detected NO_PROXY, should I use this in all Codefresh components?',
|
|
385
|
+
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (appProxy && !appProxyHost) {
|
|
390
|
+
// will only be asked if you want to install app-proxy but you give no host in the options
|
|
391
|
+
questions.push({
|
|
392
|
+
type: 'input',
|
|
393
|
+
name: 'appProxyHost',
|
|
394
|
+
message: 'The hostname that will be used by the app-proxy ingress',
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
if (_.isUndefined(shouldMakeDefaultRe)) {
|
|
399
|
+
if (!_.get(sdk, 'config.context.isNoAuth') && await isNewAccount()) {
|
|
400
|
+
// don't ask and set this runtime as default if it's a new account
|
|
401
|
+
shouldMakeDefaultRe = true;
|
|
402
|
+
} else {
|
|
403
|
+
let message = 'Set this as the default runtime environment for your Codefresh account?';
|
|
404
|
+
const [, defaultRe] = await to(getDefaultRuntime());
|
|
405
|
+
if (defaultRe) {
|
|
406
|
+
message = `Change the current default runtime "${colors.cyan(defaultRe.metadata.name)}" to new runtime ?`;
|
|
407
|
+
}
|
|
408
|
+
questions.push({
|
|
409
|
+
type: 'confirm',
|
|
410
|
+
name: 'shouldMakeDefaultRe',
|
|
411
|
+
default: INSTALLATION_DEFAULTS.MAKE_DEFAULT_RE,
|
|
412
|
+
message,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (_.isUndefined(shouldExecutePipeline)) {
|
|
418
|
+
questions.push({
|
|
419
|
+
type: 'confirm',
|
|
420
|
+
name: 'shouldExecutePipeline',
|
|
421
|
+
default: INSTALLATION_DEFAULTS.RUN_DEMO_PIPELINE,
|
|
422
|
+
message: shouldUseHelm ? 'Create demo pipeline?' : 'Run demo pipeline after install?',
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const answers = await inquirer.prompt(questions);
|
|
427
|
+
kubeContextName = kubeContextName || answers.context;
|
|
428
|
+
kubeNamespace = kubeNamespace || answers.namespace;
|
|
429
|
+
appProxyHost = appProxyHost || answers.appProxyHost;
|
|
430
|
+
shouldMakeDefaultRe = _.isUndefined(shouldMakeDefaultRe) ? answers.shouldMakeDefaultRe : shouldMakeDefaultRe;
|
|
431
|
+
shouldExecutePipeline = _.isUndefined(shouldExecutePipeline) ? answers.shouldExecutePipeline : shouldExecutePipeline;
|
|
432
|
+
// eslint-disable-next-line object-curly-newline
|
|
433
|
+
({ httpProxy, httpsProxy, noProxy } = answers);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
printInstallationOptionsSummary({
|
|
437
|
+
kubeContextName,
|
|
438
|
+
kubeNamespace,
|
|
439
|
+
shouldMakeDefaultRe,
|
|
440
|
+
shouldExecutePipeline,
|
|
441
|
+
httpProxy,
|
|
442
|
+
httpsProxy,
|
|
443
|
+
noProxy,
|
|
444
|
+
appProxy,
|
|
445
|
+
appProxyHost,
|
|
446
|
+
appProxyPathPrefix,
|
|
447
|
+
dryRun,
|
|
448
|
+
shouldUseHelm,
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
if (token) {
|
|
452
|
+
// Create a new context and switch to that context
|
|
453
|
+
const [err] = await to(createContext.handler({
|
|
454
|
+
apiKey: token,
|
|
455
|
+
name: INSTALLATION_DEFAULTS.CF_CONTEXT_NAME,
|
|
456
|
+
url,
|
|
457
|
+
}));
|
|
458
|
+
await handleError(err, 'Failed to use the provided token');
|
|
459
|
+
const config = await getConfigForSdk();
|
|
460
|
+
await sdk.configure(config);
|
|
461
|
+
console.log(`A Codefresh context named '${INSTALLATION_DEFAULTS.CF_CONTEXT_NAME}' was added to your "cfconfig" file.`);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
const progress = dryRun ? {} : await installationProgress.create(sdk['runner-installation'], {
|
|
465
|
+
options: {
|
|
466
|
+
kubeContextName,
|
|
467
|
+
kubeNamespace,
|
|
468
|
+
shouldMakeDefaultRe,
|
|
469
|
+
shouldExecutePipeline,
|
|
470
|
+
},
|
|
471
|
+
});
|
|
472
|
+
const progressReporter = installationProgress.buildReporter(sdk['runner-installation'], progress);
|
|
473
|
+
|
|
474
|
+
let installationPlan;
|
|
475
|
+
if (resumedInstallation) {
|
|
476
|
+
installationPlan = oldInstallationPlan;
|
|
477
|
+
installationPlan.setErrorHandler(handleError);
|
|
478
|
+
installationPlan.setProgressReporter(progressReporter);
|
|
479
|
+
} else {
|
|
480
|
+
installationPlan = new InstallationPlan({ progressReporter, errHandler: handleError });
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
addProxyVariables(envVars, { httpsProxy, httpProxy, noProxy });
|
|
484
|
+
|
|
485
|
+
// save the answers for backup
|
|
486
|
+
_argv['kube-context-name'] = kubeContextName;
|
|
487
|
+
_argv['kube-namespace'] = kubeNamespace;
|
|
488
|
+
_argv['set-default-runtime'] = shouldMakeDefaultRe;
|
|
489
|
+
_argv['exec-demo-pipeline'] = shouldExecutePipeline;
|
|
490
|
+
_argv['env-vars'] = envVars;
|
|
491
|
+
_argv['app-proxy-host'] = appProxyHost;
|
|
492
|
+
installationPlan.addContext('argv', _argv);
|
|
493
|
+
|
|
494
|
+
// run cluster acceptance tests
|
|
495
|
+
installationPlan.addStep({
|
|
496
|
+
name: 'run cluster acceptance tests',
|
|
497
|
+
func: runClusterAcceptanceTests,
|
|
498
|
+
arg: {
|
|
499
|
+
apiHost: sdk.config.context.url,
|
|
500
|
+
kubeNamespace,
|
|
501
|
+
kubeConfigPath,
|
|
502
|
+
kubeContextName,
|
|
503
|
+
dockerRegistry,
|
|
504
|
+
envVars,
|
|
505
|
+
verbose,
|
|
506
|
+
valuesFile,
|
|
507
|
+
setValue,
|
|
508
|
+
setFile,
|
|
509
|
+
bypassDownload,
|
|
510
|
+
},
|
|
511
|
+
installationEvent: installationProgress.events.ACCEPTANCE_TESTS_RAN,
|
|
512
|
+
condition: !skipClusterTest && !shouldUseHelm,
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
// generate new agent name
|
|
516
|
+
installationPlan.addContext('agentName', name ? name.trim() : name);
|
|
517
|
+
installationPlan.addStep({
|
|
518
|
+
name: 'generate new agent name',
|
|
519
|
+
func: async (contextName, namespace) => {
|
|
520
|
+
const agentName = await newAgentName(contextName, namespace);
|
|
521
|
+
installationPlan.addContext('agentName', agentName);
|
|
522
|
+
},
|
|
523
|
+
args: [kubeContextName, kubeNamespace],
|
|
524
|
+
condition: async () => !installationPlan.getContext('agentName'),
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
// create new agent
|
|
528
|
+
installationPlan.addStep({
|
|
529
|
+
name: 'create new agent',
|
|
530
|
+
func: async () => {
|
|
531
|
+
const agentName = installationPlan.getContext('agentName');
|
|
532
|
+
const agent = await sdk.agents.create({ name: agentName });
|
|
533
|
+
installationPlan.addContext('agent', agent);
|
|
534
|
+
const { token: agentToken } = agent;
|
|
535
|
+
console.log(`A Codefresh Runner with the name: ${colors.cyan(agentName)} has been created.`);
|
|
536
|
+
installationPlan.addContext('agentToken', agentToken);
|
|
537
|
+
},
|
|
538
|
+
installationEvent: installationProgress.events.AGENT_CREATED,
|
|
539
|
+
condition: async () => !installationPlan.getContext('agentToken'),
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// install agent
|
|
543
|
+
installationPlan.addStep({
|
|
544
|
+
name: 'install new agent',
|
|
545
|
+
func: async () => {
|
|
546
|
+
await installAgent({
|
|
547
|
+
apiHost: sdk.config.context.url,
|
|
548
|
+
kubeContextName,
|
|
549
|
+
kubeNamespace,
|
|
550
|
+
token: installationPlan.getContext('agentToken'),
|
|
551
|
+
kubeNodeSelector,
|
|
552
|
+
tolerations,
|
|
553
|
+
kubeConfigPath,
|
|
554
|
+
dockerRegistry,
|
|
555
|
+
verbose,
|
|
556
|
+
agentId: installationPlan.getContext('agentName'),
|
|
557
|
+
envVars,
|
|
558
|
+
valuesFile, // --values
|
|
559
|
+
setValue, // --set-value
|
|
560
|
+
setFile, // --set-file
|
|
561
|
+
dryRun,
|
|
562
|
+
bypassDownload,
|
|
563
|
+
});
|
|
564
|
+
},
|
|
565
|
+
installationEvent: installationProgress.events.AGENT_INSTALLED,
|
|
566
|
+
executeOnDryRun: true,
|
|
567
|
+
condition: !shouldUseHelm,
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
// generate new runtime name
|
|
571
|
+
installationPlan.addContext('runtimeName', runtimeName ? runtimeName.trim() : runtimeName);
|
|
572
|
+
installationPlan.addStep({
|
|
573
|
+
name: 'generate new runtime name',
|
|
574
|
+
func: async (contextName, namespace) => {
|
|
575
|
+
const reName = await newRuntimeName(contextName, namespace);
|
|
576
|
+
installationPlan.addContext('runtimeName', reName);
|
|
577
|
+
},
|
|
578
|
+
args: [kubeContextName, kubeNamespace],
|
|
579
|
+
condition: async () => !installationPlan.getContext('runtimeName'),
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
// create new runtime
|
|
583
|
+
installationPlan.addStep({
|
|
584
|
+
name: 'create new runtime',
|
|
585
|
+
func: async () => {
|
|
586
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
587
|
+
const runtimeCreateOpt = {
|
|
588
|
+
namespace: kubeNamespace,
|
|
589
|
+
storageClassName: storageClassName || `${INSTALLATION_DEFAULTS.STORAGE_CLASS_PREFIX}-${kubeNamespace}`,
|
|
590
|
+
serviceAccount: INSTALLATION_DEFAULTS.RUNTIME_SERVICE_ACCOUNT,
|
|
591
|
+
clusterName: kubeContextName,
|
|
592
|
+
runtimeEnvironmentName: reName,
|
|
593
|
+
agent: true,
|
|
594
|
+
dockerDaemonScheduler: {
|
|
595
|
+
userAccess: dockerDaemonAccess,
|
|
596
|
+
},
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
if (buildNodeSelector) {
|
|
600
|
+
runtimeCreateOpt.nodeSelector = keyValueAsStringToObject(buildNodeSelector);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
await sdk.cluster.create(runtimeCreateOpt);
|
|
604
|
+
console.log(`Runtime environment "${colors.cyan(reName)}" has been created`);
|
|
605
|
+
},
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
// update runtime images with docker-registry
|
|
609
|
+
installationPlan.addStep({
|
|
610
|
+
name: 'update runtime environment images with docker-registry url',
|
|
611
|
+
func: async () => {
|
|
612
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
613
|
+
const re = await sdk.runtimeEnvs.get({ name: reName });
|
|
614
|
+
const body = _.set({}, 'runtimeScheduler.envVars', getRuntimeImagesWithRegistryUrl(dockerRegistry));
|
|
615
|
+
_.set(body, 'runtimeScheduler.image', `${dockerRegistry}/codefresh/engine:master`);
|
|
616
|
+
_.set(body, 'dockerDaemonScheduler.dindImage', `${dockerRegistry}/codefresh/dind:18.09.5-v24-sp`);
|
|
617
|
+
await sdk.runtimeEnvs.update({ name: reName }, _.merge(re, body));
|
|
618
|
+
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with the specified docker-registry images`);
|
|
619
|
+
},
|
|
620
|
+
condition: !!dockerRegistry && dockerRegistry !== defaultDockerRegistry,
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
// update env vars
|
|
624
|
+
installationPlan.addStep({
|
|
625
|
+
name: 'update runtime environment with env vars and resources',
|
|
626
|
+
func: async () => {
|
|
627
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
628
|
+
const re = await sdk.runtimeEnvs.get({ name: reName });
|
|
629
|
+
|
|
630
|
+
// update re env vars
|
|
631
|
+
if (envVars.length || reEnvVars) {
|
|
632
|
+
const envVarsObj = _.merge(keyValueArrayToObject(envVars), reEnvVars);
|
|
633
|
+
|
|
634
|
+
const currentEngineEnvVars = _.get(re, 'runtimeScheduler.envVars', {});
|
|
635
|
+
const currentDindEnvVars = _.get(re, 'dockerDaemonScheduler.envVars', {});
|
|
636
|
+
const newEngineEnvVars = _.merge(currentEngineEnvVars, envVarsObj);
|
|
637
|
+
const newDindEnvVars = _.merge(currentDindEnvVars, envVarsObj);
|
|
638
|
+
|
|
639
|
+
_.set(re, 'runtimeScheduler.envVars', newEngineEnvVars);
|
|
640
|
+
_.set(re, 'dockerDaemonScheduler.envVars', newDindEnvVars);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// update dind resources
|
|
644
|
+
if (reResources) {
|
|
645
|
+
_.set(re, 'dockerDaemonScheduler.defaultDindResources', reResources);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
if (reTolerations) {
|
|
649
|
+
_.set(re, 'runtimeScheduler.tolerations', reTolerations);
|
|
650
|
+
_.set(re, 'dockerDaemonScheduler.tolerations', reTolerations);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
if (userVolumeMounts) {
|
|
654
|
+
const currentdockerDaemonScheduler = _.get(re, 'dockerDaemonScheduler', {});
|
|
655
|
+
const newDockerDaemonScheduler = _.merge(currentdockerDaemonScheduler, { userVolumeMounts });
|
|
656
|
+
_.set(re, 'dockerDaemonScheduler', newDockerDaemonScheduler);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if (userVolumes) {
|
|
660
|
+
const currentdockerDaemonScheduler = _.get(re, 'dockerDaemonScheduler', {});
|
|
661
|
+
const newDockerDaemonScheduler = _.merge(currentdockerDaemonScheduler, { userVolumes });
|
|
662
|
+
_.set(re, 'dockerDaemonScheduler', newDockerDaemonScheduler);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
await sdk.runtimeEnvs.update({ name: reName }, re);
|
|
666
|
+
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with env vars`);
|
|
667
|
+
},
|
|
668
|
+
condition: envVars.length || reResources || userVolumeMounts || userVolumes || reEnvVars,
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
// set runtime as default
|
|
672
|
+
installationPlan.addStep({
|
|
673
|
+
name: 'set new runtime as default',
|
|
674
|
+
func: async () => {
|
|
675
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
676
|
+
const re = await sdk.runtimeEnvs.get({
|
|
677
|
+
name: reName,
|
|
678
|
+
});
|
|
679
|
+
await sdk.runtimeEnvs.setDefault({ account: re.accountId, name: re.metadata.name });
|
|
680
|
+
console.log(`Runtime environment "${colors.cyan(reName)}" has been set as the default runtime`);
|
|
681
|
+
},
|
|
682
|
+
condition: shouldMakeDefaultRe,
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
// add cluster integration
|
|
686
|
+
installationPlan.addStep({
|
|
687
|
+
name: 'add cluster integration',
|
|
688
|
+
func: async () => {
|
|
689
|
+
await createClusterCmd.handler({
|
|
690
|
+
'kube-context': kubeContextName,
|
|
691
|
+
namespace: kubeNamespace,
|
|
692
|
+
'behind-firewall': true,
|
|
693
|
+
serviceaccount: 'default',
|
|
694
|
+
terminateProcess: false,
|
|
695
|
+
});
|
|
696
|
+
},
|
|
697
|
+
installationEvent: installationProgress.events.CLUSTER_INTEGRATION_ADDED,
|
|
698
|
+
condition: async () => {
|
|
699
|
+
if (skipClusterIntegration) {
|
|
700
|
+
return false;
|
|
701
|
+
}
|
|
702
|
+
if (isInCluster()) {
|
|
703
|
+
console.log('Cluster integration was not added , please add it via codefresh "create clusters [name]"');
|
|
704
|
+
return false;
|
|
705
|
+
}
|
|
706
|
+
const clusters = await sdk.clusters.list() || [];
|
|
707
|
+
if (clusters.find(cluster => cluster.selector === kubeContextName)) {
|
|
708
|
+
return false; // cluster already exists
|
|
709
|
+
}
|
|
710
|
+
return true;
|
|
711
|
+
},
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
// install runtime on cluster
|
|
715
|
+
installationPlan.addStep({
|
|
716
|
+
name: 'install runtime',
|
|
717
|
+
func: async () => {
|
|
718
|
+
await installRuntime({
|
|
719
|
+
apiHost: sdk.config.context.url,
|
|
720
|
+
name: installationPlan.getContext('runtimeName'),
|
|
721
|
+
kubeContextName,
|
|
722
|
+
kubeNamespace,
|
|
723
|
+
token: sdk.config.context.token,
|
|
724
|
+
kubeConfigPath,
|
|
725
|
+
verbose,
|
|
726
|
+
kubeNodeSelector,
|
|
727
|
+
dockerRegistry,
|
|
728
|
+
envVars,
|
|
729
|
+
valuesFile,
|
|
730
|
+
setValue,
|
|
731
|
+
setFile,
|
|
732
|
+
storageClassName,
|
|
733
|
+
dryRun,
|
|
734
|
+
bypassDownload,
|
|
735
|
+
});
|
|
736
|
+
},
|
|
737
|
+
installationEvent: installationProgress.events.RUNTIME_INSTALLED,
|
|
738
|
+
executeOnDryRun: true,
|
|
739
|
+
condition: !shouldUseHelm,
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
// install app-proxy
|
|
743
|
+
installationPlan.addStep({
|
|
744
|
+
name: 'install app-proxy',
|
|
745
|
+
func: async () => {
|
|
746
|
+
await installAppProxy({
|
|
747
|
+
apiHost: sdk.config.context.url,
|
|
748
|
+
kubeContextName,
|
|
749
|
+
kubeNamespace,
|
|
750
|
+
verbose,
|
|
751
|
+
kubeConfigPath,
|
|
752
|
+
dockerRegistry,
|
|
753
|
+
envVars,
|
|
754
|
+
valuesFile,
|
|
755
|
+
setValue,
|
|
756
|
+
setFile,
|
|
757
|
+
bypassDownload,
|
|
758
|
+
appProxyHost,
|
|
759
|
+
appProxyIngressClass,
|
|
760
|
+
dryRun,
|
|
761
|
+
});
|
|
762
|
+
},
|
|
763
|
+
installationEvent: installationProgress.events.APP_PROXY_INSTALLED,
|
|
764
|
+
condition: !!appProxy && !shouldUseHelm,
|
|
765
|
+
executeOnDryRun: true,
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// update runtime with ingress IP
|
|
769
|
+
installationPlan.addStep({
|
|
770
|
+
name: 'update runtime environment app proxy ip',
|
|
771
|
+
func: async () => {
|
|
772
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
773
|
+
const re = await sdk.runtimeEnvs.get({ name: reName });
|
|
774
|
+
const body = {
|
|
775
|
+
appProxy: {
|
|
776
|
+
externalIP: `https://${appProxyHost}${appProxyPathPrefix || ''}`,
|
|
777
|
+
},
|
|
778
|
+
};
|
|
779
|
+
await sdk.runtimeEnvs.update({ name: reName }, _.merge(re, body));
|
|
780
|
+
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with the app proxy`);
|
|
781
|
+
},
|
|
782
|
+
condition: !!appProxy && !!appProxyHost,
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
// update agent with new runtime
|
|
786
|
+
installationPlan.addStep({
|
|
787
|
+
name: 'update agent with new runtime',
|
|
788
|
+
func: async () => {
|
|
789
|
+
const reName = installationPlan.getContext('runtimeName');
|
|
790
|
+
const agent = installationPlan.getContext('agent');
|
|
791
|
+
const rt = await sdk.runtimeEnvs.get({ name: reName });
|
|
792
|
+
if (!rt) {
|
|
793
|
+
throw new Error(`runtime ${reName} does not exist on the account`);
|
|
794
|
+
}
|
|
795
|
+
if (!rt.metadata.agent) {
|
|
796
|
+
throw new Error('cannot attach non hybrid runtime');
|
|
797
|
+
}
|
|
798
|
+
const runtimes = _.get(agent, 'runtimes', []);
|
|
799
|
+
const existingRT = _.find(runtimes, value => value === reName);
|
|
800
|
+
if (!existingRT) {
|
|
801
|
+
runtimes.push(reName);
|
|
802
|
+
await sdk.agents.update({ agentId: agent.id, runtimes });
|
|
803
|
+
} else {
|
|
804
|
+
throw new Error(`Runtime ${name} already attached`);
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
installationEvent: installationProgress.events.AGENT_UPDATED,
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
// attach runtime to agent
|
|
811
|
+
installationPlan.addStep({
|
|
812
|
+
name: 'attach runtime to agent',
|
|
813
|
+
func: async () => {
|
|
814
|
+
await attachRuntime({
|
|
815
|
+
kubeContextName, // kube-context-name
|
|
816
|
+
kubeNamespace, // --kube-namespace
|
|
817
|
+
kubeConfigPath, // --kube-config-path
|
|
818
|
+
agentKubeContextName: kubeContextName, // --kube-context-name-agent
|
|
819
|
+
agentKubeNamespace: kubeNamespace, // --kube-namespace-agent
|
|
820
|
+
agentKubeConfigPath: kubeConfigPath, // --kube-config-path-agent
|
|
821
|
+
restartAgent: true, // --restart-agent
|
|
822
|
+
verbose, // --verbose
|
|
823
|
+
runtimeName: installationPlan.getContext('runtimeName'), // --runtimeName
|
|
824
|
+
dryRun,
|
|
825
|
+
bypassDownload,
|
|
826
|
+
valuesFile,
|
|
827
|
+
setValue,
|
|
828
|
+
setFile,
|
|
829
|
+
});
|
|
830
|
+
},
|
|
831
|
+
installationEvent: installationProgress.events.RUNNER_INSTALLED,
|
|
832
|
+
executeOnDryRun: true,
|
|
833
|
+
condition: !shouldUseHelm,
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
function shouldInstallMonitoringFn() {
|
|
838
|
+
if (!installMonitor) {
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
if (isInCluster() || skipClusterIntegration) {
|
|
843
|
+
console.log('Monitor component cannot be installed without cluster integration, you can install it seperately using: "codefresh install monitor"');
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
return true;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
const monitoringToken = _.get(sdk, 'config.context.token');
|
|
851
|
+
|
|
852
|
+
// install monitoring
|
|
853
|
+
installationPlan.addStep({
|
|
854
|
+
name: 'install cluster monitoring',
|
|
855
|
+
func: installMonitoring.handler,
|
|
856
|
+
arg: {
|
|
857
|
+
'kube-config-path': kubeConfigPath,
|
|
858
|
+
'cluster-id': kubeContextName,
|
|
859
|
+
'kube-context-name': kubeContextName,
|
|
860
|
+
'kube-namespace': kubeNamespace,
|
|
861
|
+
'docker-registry': dockerRegistry,
|
|
862
|
+
'env-vars': envVars,
|
|
863
|
+
'set-value': setValue,
|
|
864
|
+
'set-file': setFile,
|
|
865
|
+
'dry-run': dryRun,
|
|
866
|
+
'bypass-download': bypassDownload,
|
|
867
|
+
token: monitoringToken,
|
|
868
|
+
verbose,
|
|
869
|
+
noExit: true, // to prevent if from calling inner: process.exit()
|
|
870
|
+
url,
|
|
871
|
+
values: valuesFile,
|
|
872
|
+
},
|
|
873
|
+
successMessage: 'Successfully installed cluster monitoring',
|
|
874
|
+
installationEvent: installationProgress.events.MONITOR_INSTALLED,
|
|
875
|
+
executeOnDryRun: true,
|
|
876
|
+
condition: !shouldUseHelm && shouldInstallMonitoringFn,
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
// helm value files if its enabled
|
|
880
|
+
installationPlan.addStep({
|
|
881
|
+
name: 'generate helm value files',
|
|
882
|
+
func: async () => {
|
|
883
|
+
const runtimeNameContext = installationPlan.getContext('runtimeName');
|
|
884
|
+
const agent = installationPlan.getContext('agent');
|
|
885
|
+
|
|
886
|
+
const keys = await produceVenonaKeys(kubeNamespace);
|
|
887
|
+
|
|
888
|
+
const _appProxy = {
|
|
889
|
+
enabled: appProxy || false,
|
|
890
|
+
host: appProxyHost || '',
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
const monitor = {
|
|
894
|
+
enabled: shouldInstallMonitoringFn(),
|
|
895
|
+
clusterId: kubeContextName,
|
|
896
|
+
token: monitoringToken,
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
const global = {
|
|
900
|
+
namespace: kubeNamespace,
|
|
901
|
+
codefreshHost: sdk.config.context.url,
|
|
902
|
+
agentToken: agent.token,
|
|
903
|
+
agentId: agent.id,
|
|
904
|
+
agentName: agent.name,
|
|
905
|
+
accountId: agent.account,
|
|
906
|
+
runtimeName: runtimeNameContext,
|
|
907
|
+
keys,
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
const content = JSON.stringify({ appProxy: _appProxy, monitor, global }, null, 4);
|
|
911
|
+
|
|
912
|
+
fs.writeFileSync(
|
|
913
|
+
helmValuesFile,
|
|
914
|
+
content,
|
|
915
|
+
{
|
|
916
|
+
encoding: 'utf8',
|
|
917
|
+
},
|
|
918
|
+
);
|
|
919
|
+
},
|
|
920
|
+
condition: shouldUseHelm,
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
// Post Installation
|
|
924
|
+
if (shouldExecutePipeline) {
|
|
925
|
+
await addPipelineToInstallationPlan(installationPlan, dockerRegistry, !shouldUseHelm);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
await installationPlan.execute();
|
|
929
|
+
|
|
930
|
+
if (!shouldUseHelm) {
|
|
931
|
+
console.log(colors.green('\nRunner Status:'));
|
|
932
|
+
await getAgents.handler({});
|
|
933
|
+
console.log('');
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
if (installMonitor) {
|
|
937
|
+
console.log(`Go to ${colors.blue('https://g.codefresh.io/kubernetes/services/')} to view your cluster in Codefresh dashbaord`);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
console.log(`Link to the new runtime: ${colors.blue(`https://g.codefresh.io/account-admin/account-conf/runtime-environments?runtime=${encodeURI(installationPlan.getContext('runtimeName'))}`)}`);
|
|
941
|
+
console.log(`\nDocumentation link: ${colors.blue('https://codefresh.io/docs/docs/enterprise/codefresh-runner/#codefresh-runner-preview-release')}`);
|
|
942
|
+
console.log(`If you had any issues with the installation please report them at: ${colors.blue('https://github.com/codefresh-io/cli/issues/new')}`);
|
|
943
|
+
await to(progressReporter.report(installationProgress.events.FINISHED, installationProgress.status.SUCCESS));
|
|
944
|
+
await drawCodefreshFiglet();
|
|
945
|
+
|
|
946
|
+
if (shouldUseHelm) {
|
|
947
|
+
console.log(colors.blue('\nTo complete helm installation run: '));
|
|
948
|
+
console.log(' helm repo add cf-runtime https://h.cfcr.io/codefresh-inc/runtime');
|
|
949
|
+
console.log(` helm install cf-runtime cf-runtime/cf-runtime -f ${helmValuesFile} --create-namespace --namespace ${kubeNamespace}`);
|
|
950
|
+
console.log(colors.blue('\nIn order to test your runner helm based installation please execute:\n'));
|
|
951
|
+
console.log(` codefresh runner execute-test-pipeline --runtime-name ${installationPlan.getContext('runtimeName')}\n`);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
process.exit(); // TODO : This is not needed - needed to be fixed
|
|
955
|
+
},
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
module.exports = initCmd;
|