Commit Graph

58 Commits

Author SHA1 Message Date
Sebastian Qvarfordt b041aab8ad [TechDocs] Remove all git preparers and use a commonGit preparer instead (#2856)
* Remove all git preparers and use a commonGit preparer instead

* Added more tests

* Updated default-app template
2020-10-13 09:07:14 +02:00
blam 46960a61ec v0.1.1-alpha.25 2020-10-12 22:42:54 +02:00
Patrik Oldsberg 468d4a2dae Merge pull request #2684 from themousepotato/lintrule-dirname-fix
Add a lint rule to avoid using __dirname
2020-10-09 21:03:13 +02:00
Navaneeth Suresh bbeaff9daf Add a lint rule to avoid using __dirname 2020-10-09 15:03:29 +05:30
Himanshu Mishra c852e7b09d Merge pull request #2812 from spotify/sebastianq/techdocs-new-component-url
[TechDocs] Use new url scheme for techdocs
2020-10-09 10:41:47 +02:00
Mattias Frinnström b46863b88b Techdocs: add Azure DevOps prepare support (#2748)
* Update to latest git-url-parse

* Add Azure DevOps preparer to techdocs

* Upgraded git-url-parse in backend-common

* Switch to AZURE_TOKEN

Co-authored-by: Mattias Frinnström <mattias.frinnstrom@husqvarnagroup.com>
2020-10-09 09:37:20 +02:00
Sebastian Qvarfordt ae499a55ff Use new url scheme for techdocs 2020-10-08 16:59:30 +02:00
Marvin9 f05e4b9608 re: make consistent environment variables
GITHUB_PRIVATE_TOKEN & GITHUB_ACCESS_TOKEN => GITHUB_TOKEN
GITLAB_PRIVATE_TOKEN, GITLAB_ACCESS_TOKEN & SCAFFOLDER_GITLAB_PRIVATE_TOKEN => GITLAB_TOKEN
AZURE_PRIVATE_TOKEN => AZURE_TOKEN
GHE_PRIVATE_TOKEN => GHE_TOKEN
2020-10-08 10:34:06 +05:30
Patrik Oldsberg 46b71700ee v0.1.1-alpha.24 2020-10-05 15:45:33 +02:00
Sebastian Qvarfordt c16920db2b Always rebuild docs if stored locally (#2719) 2020-10-02 11:48:01 +02:00
Evgeny Vlasov e0dce26354 TechDocs: add gitlab preparer & rewrite default-branch package (#2469)
* add gitlab preparer & rewrite default-branch package

* feat(techdocs-backend): rewrite default-branch module
2020-10-02 11:10:02 +02:00
Emma Indal 497675538c TechDocs: browse metadata (#2682)
* feat(techdocs): TechDocsPageWrapper to take in labels prop and use TechDocsHeader component

* feat(techdocs): new TechDocsHeader component as wrapper around Header from core

* feat(techdocs): TechDocsPage metadata

* feat(techdocs): TechDocsMetadata class responsible for reading metadata from generated techdocs metadata json file

* fix(techdocs): delete TechDocsPageWrapper component

* fix(app-config): delete /docs from request url

* feat(techdocs): TechDocsHeader with labels to browse metadata

* fix(techdocs): move metadata to backend plugin

* feat(techdocs-backend): introduce two new metadata routes

* feat(techdocs): new techdocs api to be responsible to request metadata from backend

* feat(techdocs): register new api for plugin

* fix(techdocs): reader to take in onReady prop

* fix(techdocs): TechDocsHome component to use its own header

* fix(techdocs): TechDocsPage responsible to get metadata and pass it down to the TechDocsHeader

* fix(techdocs): component tests for both TechDocsHeader and TechDocsPage

* fix(techdocs): adjust api to use /docs in url since it was taken away in requestURL

* fix(tests): move assertion into act

* fix(techdocs): rename TechDocsHeader to TechDocsPageHeader

* fix(techdocs): rename TechDocsHeader to TechDocsPageHeader

* fix(techdocs-backend): add some logs

* Update plugins/techdocs/src/reader/components/TechDocsPage.test.tsx

* delete unused import
2020-10-01 10:12:24 +02:00
Patrik Oldsberg 2a443ce68d techdocs-backend: use endpoint discovery to look up catalog url 2020-09-25 10:50:33 +02:00
Emma Indal b41ffc8c0f add /api to catalog endpoint (#2595) 2020-09-24 17:26:34 +02:00
Patrik Oldsberg 9c5a0e836b Merge pull request #2562 from spotify/rugvip/api
backend: change the default backend plugin mount point to /api
2020-09-24 15:58:12 +02:00
blam 6c55d38348 v0.1.1-alpha.23 2020-09-23 16:40:49 +02:00
Patrik Oldsberg 521728348d backend: change the default backend plugin mount point to /api 2020-09-23 09:39:47 +02:00
Sebastian Qvarfordt b80a833323 comment to explain option 2020-09-21 16:51:46 +02:00
Sebastian Qvarfordt 525aabeb47 Added toggled option for allowing longpath in windows through nodegit 2020-09-21 15:33:53 +02:00
Raghunandan 72235dd51e v0.1.1-alpha.22 2020-09-18 15:14:38 +02:00
Sebastian Qvarfordt f097c32b59 TechDocs: Use a flag to determine if we should use a local mkdocs or techdocs-container (#2503)
* Use a flag to determine wether to use techdocs-container or local install of mkdocs

* Updated techdocs generator to look at app-config string instead of argument to decide how to run the generator

* Removed console log...

* Reverted scaffolder file that was accidentally committed.

* Fixed lint issues

* Added config to create-app template
2020-09-18 14:02:35 +02:00
Perry Manuk 21a366077a Techdocs without docker-in-docker (#2438)
We're deploying backstage to GKE and have had issues getting techdocs
volume mount logic to work because of mixing paths between the host and
the container running the backend. So we added a condition where if
mkdocs is found in the backend container it will use that to generate
the docs rather than spinning it up in a docker container.
2020-09-17 15:26:39 +02:00
Iain Billett 2331e79897 Test for docker before attempting to run a container (#2497)
Test for docker using ping() before attempting any docker
operations. If this fails we know docker is unavailable
and we can fail with an more descriptive error.
2020-09-17 15:18:13 +02:00
Björn Marschollek 55542797a9 Add GitLab integration for scaffolder
This adds a GitLab integration for the scaffolder backend.

We're introduceing a preparer and a publisher for GitLab so that we can
read templates from GitLab and publish them to a configured GitLab
instance. The two instances don't need to be the same. For instance,
templates could be public on gitlab.com, but the created repos will live
in a hosted GitLab somewhere else.

The publisher gets its own config object in `app-config.yaml` where the
target instance and token can be specified.

The service catalogue defines both `gitlab` and `gitlab/api` as
processors. They are both handled by the same preparer.

Closes #2372
2020-09-17 12:39:05 +02:00
Sebastian Qvarfordt 398d7eb91e TechDocs: Fix building if you already have a corrupt git tmp folder (#2457)
* Fix building if you already have a corrupt git tmp folder

* Logging the error we get before trying to recover
2020-09-14 16:57:37 +02:00
Patrik Oldsberg 3cf20cbad7 remove mock-data scripts 2020-09-12 15:27:27 +02:00
Sebastian Qvarfordt d865f88344 [TechDocs] Rebuild docs if the github source is newer than last docs build (#2353)
* Added age check for documentation in github to make sure it's up to date

* Updated failing tests

* Updated docs to explain requestUrl and storageUrl

* Updated failing tests

* Update packages/create-app/templates/default-app/app-config.yaml.hbs

* Update docs/features/techdocs/getting-started.md

Co-authored-by: Emma Indal <emmai@spotify.com>
2020-09-09 16:05:28 +02:00
Patrik Oldsberg 566f1f890e techdocs-backend: make tests work on windows 2020-09-06 14:38:24 +02:00
Jacob Valdemar 01f4563c92 TechDocs & Catalog: Private Github repository support (#2247)
* Add private repo functionality to GhReaderProcesor

* Add github helper for private github repo

* Edit test

* lint

* Remove debugging console.log()

* Less specific if statement

* shorten get private token

* Actual shortening

* Change how current branch name is retrieved
2020-09-04 09:59:14 +02:00
Patrik Oldsberg 875f254827 Merge branch 'master' into new-release-31-aug-20 2020-09-02 16:17:40 +02:00
Sebastian Qvarfordt 07c9a9474a Get branchname from repo instance instead of location url (#2242) 2020-09-02 15:30:35 +02:00
Patrik Oldsberg 0af1ce25ca techdocs-backend: use resolvePackagePath instead of __dirname 2020-09-02 13:02:43 +02:00
Emma Indal 3b545791ce new release 31 aug 20 2020-09-01 14:10:22 +02:00
Emma Indal ff5da01280 TechDocs: techdocs backend tests (#2196)
* add tests for generators class

* add tests for helpers

* renaming

* fixup
2020-09-01 09:54:05 +02:00
Rod Machen 57c3e2ad5b update software template docs 2020-08-28 14:07:25 -05:00
Sebastian Qvarfordt f6698e2e0c Added some more docs for techdocs-backend (#2124)
* Added some more docs for techdocs-backend

* Update plugins/techdocs-backend/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Update plugins/techdocs-backend/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Added example of techdocs storageUrl config

Co-authored-by: Emma Indal <emmai@spotify.com>
2020-08-26 15:42:02 +02:00
Raghunandan 734dcca107 Release v0.1.1-alpha.20 2020-08-26 11:33:14 +02:00
Sebastian Qvarfordt a027e632a0 Merge latest changes from origin before rebuilding docs (#2117)
* Added missing tests and make sure we merge latest changes before building docs from a repo

* Removed flaky test
2020-08-25 17:03:10 +02:00
Sebastian Qvarfordt f6826d9107 Moved git clone to a helper functions and added tests for preparers (#2112) 2020-08-25 16:21:53 +02:00
Sebastian Qvarfordt 2e50876160 Throw error when failing to generate docs to prevent request loop (#2073) 2020-08-21 15:30:50 +02:00
Emma Indal f6f56aa748 TechDocs: documentation template (#1954)
* feat(docs-template): Add docs template to create a standalone docs project

* fix(docs-template): add docs template to mock data

* fix(docs-template): owner of template

* add techdocs-ref to cookiecutter docs project

* delete unused cookiecutter json file

* update docs in default index.md file

* rename from .yaml to .yml to be consistent to docs

* update techdocs-ref to use github protocol
2020-08-21 14:56:46 +02:00
Raghunandan Balachandran 9b8024352a Merge pull request #2046 from spotify/new-release-20-aug-20
Release v0.1.1-alpha.19
2020-08-21 14:13:56 +02:00
Sebastian Qvarfordt 613c06bdd6 Techdocs: Updates preparers to make it work in actual usecases (#1957)
* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* attempt to add back react as a dep

* Fixed failing test

* fix(techdocs): Hopefully fixed tests

* Fixed another failing test

* Initial apiRef for techdocs storage

* Cleaned up some code in reader

* test(headertabs): add tests to HeaderTabs component

* fix(headertabs): change tab mock id

* fix(techdocs-generator): fix problem with macOS symlink to tmp folder

* fix(lint): remove unused configApiRef

* wip

* Ongoing cleanups

* Cleanups and fix tests

* Initial github preparer. Doesn't work properly yet

* Updated dir preparer to handle github managed-by-location and added github preparer

* Removed old file

* Fixed feedback and added better logging to techdocs build process

* Updated create-app template

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Emma Indal <emmai@spotify.com>
2020-08-21 12:11:03 +02:00
Raghunandan 15e334a584 Release v0.1.1-alpha.19 2020-08-21 11:40:04 +02:00
Sebastian Qvarfordt 13908d69c2 TechDocs: Access entity techdocs from service catalog (#1835)
* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* attempt to add back react as a dep

* Fixed failing test

* fix(techdocs): Hopefully fixed tests

* Fixed another failing test

* Initial apiRef for techdocs storage

* Cleaned up some code in reader

* test(headertabs): add tests to HeaderTabs component

* fix(headertabs): change tab mock id

* fix(techdocs-generator): fix problem with macOS symlink to tmp folder

* fix(lint): remove unused configApiRef

* wip

* Ongoing cleanups

* Cleanups and fix tests

* WIP cleanups

* Clean up some things

* Clean up some things

* Added missing notice header

* ts issue fixed

* Add show contition to api tab

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Emma Indal <emmai@spotify.com>
2020-08-20 14:06:09 +02:00
Oliver Sand 774a000729 Readme for api-docs Plugin (#2041)
* docs(api-docs): add details to readme

* docs: fix wrong markdown in readme files
2020-08-20 13:57:59 +02:00
Patrik Oldsberg 02cadda870 update gitignore 2020-08-07 18:51:08 +02:00
Patrik Oldsberg f8c696e038 v0.1.1-alpha.18 2020-08-07 17:08:28 +02:00
Patrik Oldsberg 0dd8fa2828 v0.1.1-alpha.17 2020-08-05 19:36:36 +02:00
Sebastian Qvarfordt 97f3f58844 Mob/techdocs end to end (#1736)
* Initial techdocs end to end heavily inspired by scaffolder

* added some tests and fixed linting

* fix(techdocs-backend): fix eslint

* fix(techdocs-backend): cleanup commented test

* Removed unused dependency

* fix(techdocs-backend): updated standalone server

* moved type dependency to devDependencies

* fix: updated dependencies and devDependencies.

* Update plugins/techdocs-backend/src/techdocs/stages/generate/types.ts

Co-authored-by: Emma Indal <emma.indahl@gmail.com>

Co-authored-by: Emma Indal <emmai@spotify.com>
Co-authored-by: ellinors <ellinors@spotify.com>
Co-authored-by: Emma Indal <emma.indahl@gmail.com>
2020-08-04 13:04:48 +02:00