-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV2-2532 - refactor enterprise v1 (#1075)
* extract enterprise dependenies * refactor webpack build * refactor gh action * ga extesnion should check the cloudhost url * add self hosted config section * revert main extension change * wip * fix merge * review * dixes * dixes * fixes * fixes * fixes * fixes * DEV2-2703: Add sign in / sign out for self hosted (#1102) * DEV2-2703: Add sign in / sign out for self hosted (#1102) * DEV2-2703: Add sign in / sign out for self hosted * missing settings * Fix loggin * use http if needed * fix ci * use updater name * webpack fixes * validate public build * validate enterprise build * fixes * fix test --------- Co-authored-by: Assaf Sapir <[email protected]>
- Loading branch information
1 parent
084bd9a
commit b343007
Showing
57 changed files
with
868 additions
and
5,328 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Create Enterprise Release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*.*.*' # Push events to matching v*, i.e. v1.0.0, v20.15.10 | ||
- '!v*.*.*-alpha.*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Create Enterprise Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.19' | ||
- name: Tag Version | ||
id: tag-version | ||
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_OUTPUT | ||
|
||
- name: modify readme | ||
run: | | ||
echo "" > ./README.md | ||
echo "buildId: ${{ github.sha }}" >> ./README.md | ||
echo "" >> ./README.md | ||
- name: Install | ||
run: yarn install --frozen-lockfile --ignore-optional | ||
|
||
- name: Modify package | ||
run: npm pkg set name=\"tabnine-vscode-self-hosted-updater\" && npm pkg set displayName=\"Tabnine Enterprise\" && npm pkg delete __metadata | ||
|
||
- name: Package | ||
run: yarn run vsce:package:enterprise --out ./tabnine-vscode-enterprise-${{ steps.tag-version.outputs.RELEASE_VERSION }}.vsix | ||
|
||
- name: Package Contains Extension | ||
run: test "$(unzip -l tabnine-vscode-enterprise-${{ steps.tag-version.outputs.RELEASE_VERSION }}.vsix | grep out/extension.js | wc -l)" = "1" | ||
|
||
- name: Package is Enterprise Extension | ||
run: test "$(unzip -l tabnine-vscode-enterprise-${{ steps.tag-version.outputs.RELEASE_VERSION }}.vsix | cat out/extension.js | grep tabnine.enterprise)" -eq 1 | ||
|
||
- name: Set stable version file | ||
run: | | ||
echo ${{ steps.tag-version.outputs.RELEASE_VERSION }} > stable | ||
- name: Authenticate to Google Cloud | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
credentials_json: ${{ secrets.GCS_RELEASE_KEY }} | ||
|
||
- name: ⬆️ Upload latest stable version to GCS | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
with: | ||
path: stable | ||
destination: tabnine-self-hosted-artifacts/vscode | ||
parent: false | ||
gzip: false | ||
headers: |- | ||
content-type: text/plain | ||
- name: ⬆️ Upload vsix to GS | ||
uses: google-github-actions/upload-cloud-storage@v0 | ||
with: | ||
path: tabnine-vscode-enterprise-${{ steps.tag-version.outputs.RELEASE_VERSION }}.vsix | ||
destination: tabnine-self-hosted-artifacts/vscode | ||
parent: false |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.