Skip to content

Commit

Permalink
refactor: crda to rhda alpha (#636)
Browse files Browse the repository at this point in the history
* fix: mocha and mocha loader version error on npm install

Signed-off-by: Ilona Shishov <[email protected]>

* feat: redirect stack analysis for maven ecosystem to crda 1.5 endpoint

Signed-off-by: Ilona Shishov <[email protected]>

* chore: define a crda 1.5 endpoint variable in the Apiendpoint namesapce

Signed-off-by: Ilona Shishov <[email protected]>

* chore: updated stack analysis endpoint

Signed-off-by: Ilona Shishov <[email protected]>

* fix: render html on data on webview panel switch

Signed-off-by: Ilona Shishov <[email protected]>

* chore: define stack analysis report file path as a variable in constants

Signed-off-by: Ilona Shishov <[email protected]>

* chore: edited notifications according to LSP server changes

Signed-off-by: Ilona Shishov <[email protected]>

* chore: lint code

Signed-off-by: Ilona Shishov <[email protected]>

* feat: add crdaSnykToken to extension settings for crda 1.5 backend

Signed-off-by: Ilona Shishov <[email protected]>

* chore: pass crdaHost parameter for crda 1.5 endpoint over IPC connection

Signed-off-by: Ilona Shishov <[email protected]>

* chore: pass fullStackAnalysis command trigger parameter over IPC connection

Signed-off-by: Ilona Shishov <[email protected]>

* fix: panel status update location

Signed-off-by: Ilona Shishov <[email protected]>

* feat: add Snyk token validation on extension workspace setting change

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update crda 1.5 endpoint

Signed-off-by: Ilona Shishov <[email protected]>

* build: Upgrade to latest dependency versions

Signed-off-by: ruromero <[email protected]>

* feat: Allow dynamic CRDA token and host configuration

Signed-off-by: ruromero <[email protected]>

* fix: correct endpoints and add notification warning

Signed-off-by: Ruben Romero <[email protected]>

* fix: remove dependency with node-fetch

Signed-off-by: Ruben Romero <[email protected]>

* chore: localize apiConfig

Signed-off-by: Ilona Shishov <[email protected]>

* chore: upgrade deps

Signed-off-by: Ilona Shishov <[email protected]>

* fix: integration tests

Signed-off-by: Ruben Romero <[email protected]>

* fix: should trigger fabric8-analytics full stack-report activate test

Signed-off-by: Ilona Shishov <[email protected]>

* feat: mvn component analysis using effective-pom. rename notificationName

Signed-off-by: Ruben Romero <[email protected]>

* feat: test stack analysis javascript API

Signed-off-by: Ilona Shishov <[email protected]>

* chore: refactor stack analysis function

Signed-off-by: Ilona Shishov <[email protected]>

* fetch

Signed-off-by: ruromero <[email protected]>

* chore: replace fetch api with crda api

Signed-off-by: Ilona Shishov <[email protected]>

* chore: refactor code structure, include token in API options, and enhance fault tolerance

Signed-off-by: Ilona Shishov <[email protected]>

* chore: remove crdaHost param from global config

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: from crda to exhort

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version and adapt code

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version and update unit tests

Signed-off-by: Ilona Shishov <[email protected]>

* chore: modify tests

Signed-off-by: Ilona Shishov <[email protected]>

* chore: remove clear context

Signed-off-by: Ilona Shishov <[email protected]>

* chore: adapt caNotification parameters to vscode ext

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* chore: disable Telemetry and UserID auth

Signed-off-by: Ilona Shishov <[email protected]>

* fix: disable exhort javascript api related unit tests

Signed-off-by: Ilona Shishov <[email protected]>

* doc: documentation initial update

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update naming conventions to RHDA

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update README

Signed-off-by: Ilona Shishov <[email protected]>

* chore: add npm executable path and bump project version to 0.7.0

Signed-off-by: Ilona Shishov <[email protected]>

* 8/31/23 - ritz303 : Overhaul of the README.md content

Jira: TC-527

* chore: refactor stack analysis function

Signed-off-by: Ilona Shishov <[email protected]>

* fetch

Signed-off-by: ruromero <[email protected]>

* chore: replace fetch api with crda api

Signed-off-by: Ilona Shishov <[email protected]>

* chore: refactor code structure, include token in API options, and enhance fault tolerance

Signed-off-by: Ilona Shishov <[email protected]>

* chore: remove crdaHost param from global config

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: from crda to exhort

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version and adapt code

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version and update unit tests

Signed-off-by: Ilona Shishov <[email protected]>

* chore: modify tests

Signed-off-by: Ilona Shishov <[email protected]>

* chore: remove clear context

Signed-off-by: Ilona Shishov <[email protected]>

* chore: adapt caNotification parameters to vscode ext

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* chore: disable Telemetry and UserID auth

Signed-off-by: Ilona Shishov <[email protected]>

* fix: disable exhort javascript api related unit tests

Signed-off-by: Ilona Shishov <[email protected]>

* doc: documentation initial update

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update naming conventions to RHDA

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update README

Signed-off-by: Ilona Shishov <[email protected]>

* chore: add npm executable path and bump project version to 0.7.0

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* chore: rename image directory

Signed-off-by: Ilona Shishov <[email protected]>

* chore: upgrade workflows

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update README

Signed-off-by: Ilona Shishov <[email protected]>

* 9/5/23 - ritz303 : Edits based on SME feedback

Jira: TC-527

* 9/5/23 - ritz303 : Fixed wrong binary name

* 9/5/23 - ritz303 : Updated content for pop-up message screenshots

* 9/5/23 - ritz303 : Fixed indentation

* 9/6/23 - ritz303 : More edits from SME feedback

Fixes: Jira TC-527

* 9/6/23 - ritz303 : Minor edit

* chore: add branch to workflow push trigger

Signed-off-by: Ilona Shishov <[email protected]>

* chore: update ci workflow

Signed-off-by: Ilona Shishov <[email protected]>

* chore: add EXHORT_DEV_MODE param to Exhort JS API request

Signed-off-by: Ilona Shishov <[email protected]>

* doc: update README

Signed-off-by: Ilona Shishov <[email protected]>

* refactor: update exhort-javascript-api version

Signed-off-by: Ilona Shishov <[email protected]>

* build: change repository owner to upstream

Signed-off-by: Ilona Shishov <[email protected]>

* build: remove path-ignore

Signed-off-by: Ilona Shishov <[email protected]>

---------

Signed-off-by: Ilona Shishov <[email protected]>
Signed-off-by: ruromero <[email protected]>
Signed-off-by: Ruben Romero <[email protected]>
Co-authored-by: ruromero <[email protected]>
Co-authored-by: Aron Gunn <[email protected]>
Co-authored-by: ritz303 <[email protected]>
  • Loading branch information
4 people authored Sep 10, 2023
1 parent a16c38d commit 0315f9a
Show file tree
Hide file tree
Showing 83 changed files with 6,357 additions and 14,707 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-test:
runs-on: ubuntu-latest
if: github.repository_owner == 'fabric8-analytics'

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create .npmrc
run: |
echo "@RHEcosystemAppEng:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "@fabric8-analytics:registry=https://npm.pkg.github.com" > ~/.npmrc
- name: Install @vscode/vsce
run: npm i -g @vscode/vsce

- name: Install Dependencies
run: npm ci

- name: Compile for test
run: npm run test-compile

- name: VSCE prepublish
run: vsce package

- name: Lint code
run: npm run lint

- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Extension Build For PR ${{ github.event.pull_request.number }}
path: ./*.vsix
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commit-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.1.0
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 0 additions & 47 deletions .github/workflows/main.yaml

This file was deleted.

39 changes: 25 additions & 14 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,40 @@ on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- ".github/**"
- master

jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'fabric8-analytics'
name: Build plugin

steps:
- name: Checkout sources
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 14.x
ssh-key: ${{ secrets.DEPLOY_KEY }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create .npmrc
run: |
echo "@RHEcosystemAppEng:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "@fabric8-analytics:registry=https://npm.pkg.github.com" > ~/.npmrc
- name: Install @vscode/vsce
run: npm i -g @vscode/vsce

- name: Install Dependencies
run: npm ci

- name: Compile
- name: Compile for test
run: npm run test-compile

- name: VSCE package
Expand All @@ -41,11 +51,12 @@ jobs:
path: ./fabric8-analytics-early-access.vsix

release:
permissions: write-all
runs-on: ubuntu-latest
name: Create an early-access release
environment: staging
needs: build
if: github.repository == 'fabric8-analytics/fabric8-analytics-vscode-extension'

steps:
- name: Download vsix package artifact
uses: actions/download-artifact@v3
Expand All @@ -58,7 +69,7 @@ jobs:
uses: actions/github-script@v6
continue-on-error: true
with:
github-token: ${{ secrets.STAGING_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const repo_name = context.payload.repository.full_name
var response = await github.request('GET /repos/' + repo_name + '/releases/tags/early-access')
Expand All @@ -69,7 +80,7 @@ jobs:
if: ${{ steps.existing_release.outputs.id }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.STAGING_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const repo_name = context.payload.repository.full_name
await github.request('DELETE /repos/' + repo_name + '/releases/' + ${{ steps.existing_release.outputs.id }})
Expand All @@ -87,7 +98,7 @@ jobs:
id: new_release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.STAGING_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const repo_name = context.payload.repository.full_name
const response = await github.request('POST /repos/' + repo_name + '/releases', {
Expand Down Expand Up @@ -116,7 +127,7 @@ jobs:
asset_name=$(basename "$file")
upload_url=$(echo "${{ steps.new_release.outputs.upload_url }}" | sed "s/{?name,label}/?name=$asset_name/g")
curl --data-binary @"$file" \
-H "Authorization: token ${{ secrets.STAGING_PAT }}" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
"$upload_url"
done
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ coverage/
target/
test/resources/**/package-lock.json
test/resources/**/node_modules
.npmrc
test-workspace/
10 changes: 3 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/test-workspace"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/*.js"
Expand All @@ -26,15 +26,11 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/test/resources/sampleNodeApp/",
"${workspaceFolder}/test/resources/",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: test-compile"
},
{
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
"typescript.tsdk": "./node_modules/typescript/lib",
"redhat.telemetry.enabled": true // we want to use the TS server from our node_modules folder to control its version
}
Loading

0 comments on commit 0315f9a

Please sign in to comment.