-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from snyk-tech-services/develop
Release changes
- Loading branch information
Showing
32 changed files
with
6,878 additions
and
4,713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"contributors": ["aarlaud","punkle", "nicolasarnold12321","snyk-bot","erikvanbrakel","lili2311"] | ||
"contributors": ["aarlaud","punkle", "nicolasarnold12321","snyk-bot","erikvanbrakel","lili2311","silthus","nnillni"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
dist | ||
dist | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# How to work on this plugin | ||
|
||
## Note: This guide assumes you use yarn v1. | ||
|
||
1. Clone this plugin repository | ||
|
||
2. Create a backstage app (outside the plugin repository). If you already have one, skip this step. | ||
|
||
```bash | ||
npx @backstage/create-app | ||
``` | ||
|
||
3. Link the react libraries from backstage to the plugin with the following commands | ||
|
||
```bash | ||
# Go to the root of the Backstage app/repository | ||
yarn link --cwd node_modules/react | ||
yarn link --cwd node_modules/react-dom | ||
yarn link --cwd node_modules/react-router-dom | ||
yarn link --cwd node_modules/react-router | ||
yarn link --cwd node_modules/@material-ui/core | ||
|
||
# Go to the root of the plugin repository | ||
sh yarn-links.sh | ||
``` | ||
|
||
4. Add the plugin to the Backstage app | ||
|
||
```bash | ||
# Go to the root of the Backstage repository | ||
yarn add --cwd packages/app backstage-plugin-snyk | ||
``` | ||
|
||
5. Build your plugin (and watch for changes) | ||
|
||
```bash | ||
# Go to the root of the plugin repository | ||
yarn build --watch | ||
``` | ||
|
||
6. Add the needed components in the Backstage app as the [README.md](../README.md) explains | ||
|
||
7. Add Snyk configuration to the Backstage app | ||
|
||
```yaml | ||
proxy: | ||
endpoints: | ||
/snyk: | ||
target: https://api.snyk.io/ | ||
headers: | ||
User-Agent: tech-services/backstage-plugin/1.0 | ||
Authorization: token ${SNYK_TOKEN} | ||
snyk: | ||
# Set to "false" to use the real API | ||
mocked: true | ||
``` | ||
8. Make sure to add annotations to an entity so the plugin shows in the entity page | ||
```yaml | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: example-website | ||
annotations: | ||
snyk.io/org-id: 57059599-0459-4443-9cac-3116b5fb5549 | ||
snyk.io/project-ids: 33afab43-260a-498e-4432-f556843d2ebe | ||
``` | ||
9. You can now start the Backstage app and work in both repositories to see the changes in real time! | ||
```bash | ||
# Root of the Backstage repository | ||
yarn dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "1.0.1" | ||
"version": "1.22.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,40 @@ | ||
/* | ||
* Copyright 2021 The Backstage Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
export interface Config { | ||
/** Optional configurations for the ArgoCD plugin */ | ||
snyk?: { | ||
/** | ||
* The base url of the ArgoCD instance. | ||
* @visibility frontend | ||
*/ | ||
AppHost?: string; | ||
}; | ||
} | ||
/** Optional configurations for the Snyk plugin */ | ||
snyk?: { | ||
/** | ||
* @visibility frontend | ||
*/ | ||
appHost?: string; | ||
/** | ||
* @visibility frontend | ||
*/ | ||
AppHost?: string; // kept for backward compatibility | ||
/** | ||
* @visibility frontend | ||
*/ | ||
apiVersion?: string; | ||
/** | ||
* @visibility frontend | ||
*/ | ||
mocked?: boolean; | ||
/** | ||
* @visibility frontend | ||
*/ | ||
showResolvedInGraphs?: boolean; | ||
}; | ||
} |
Oops, something went wrong.