-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow to use OpenVsx in plug-in registry
Change-Id: I6b42aa61a6d6b8077441fab270d6950954e29698 Signed-off-by: Florent Benoit <fbenoit@redhat.com>
- Loading branch information
Showing
11 changed files
with
209 additions
and
151 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
server: | ||
port: 9000 | ||
|
||
spring: | ||
profiles: | ||
include: ovsx | ||
datasource: | ||
url: jdbc:postgresql://localhost:5432/postgres | ||
username: postgres | ||
password: | ||
jpa: | ||
properties: | ||
hibernate: | ||
dialect: org.hibernate.dialect.PostgreSQLDialect | ||
hibernate: | ||
ddl-auto: none | ||
session: | ||
store-type: jdbc | ||
jdbc: | ||
initialize-schema: never | ||
|
||
security: | ||
oauth2: | ||
client: | ||
registration: | ||
github: | ||
client-id: foo | ||
client-secret: foo | ||
|
||
management: | ||
health: | ||
probes: | ||
enabled: true | ||
|
||
ovsx: | ||
elasticsearch: | ||
enabled: false | ||
clear-on-start: true | ||
databasesearch: | ||
enabled: true |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
./start-services.sh | ||
|
||
# install temporary nodejs | ||
mkdir -p /tmp/opt/nodejs && curl -sL https://nodejs.org/download/release/v14.18.3/node-v14.18.3-linux-x64.tar.gz | tar xzf - -C /tmp/opt/nodejs --strip-components=1 | ||
# add path | ||
export PATH=/tmp/opt/nodejs/bin:$PATH | ||
|
||
|
||
# install the cli | ||
npm install -g ovsx@0.2.1 | ||
|
||
# insert user | ||
psql -c "INSERT INTO user_data (id, login_name) VALUES (1001, 'eclipse-che');" | ||
psql -c "INSERT INTO personal_access_token (id, user_data, value, active, created_timestamp, accessed_timestamp, description) VALUES (1001, 1001, 'eclipse_che_token', true, current_timestamp, current_timestamp, 'For publishing test extensions');" | ||
psql -c "UPDATE user_data SET role='admin' WHERE user_data.login_name='eclipse-che';" | ||
|
||
|
||
echo "Starting to publish extensions...." | ||
export OVSX_REGISTRY_URL=http://localhost:9000 | ||
export OVSX_PAT=eclipse_che_token | ||
|
||
ovsx create-namespace redhat | ||
ovsx publish /vsix/_jbosstools_static_jdt_ls_stable-java-0.82.0-369.vsix | ||
|
||
# drop user | ||
psql -c "ALTER TABLE personal_access_token DISABLE TRIGGER ALL;" | ||
psql -c "ALTER TABLE user_data DISABLE TRIGGER ALL;" | ||
psql -c "DELETE FROM personal_access_token;" | ||
psql -c "DELETE FROM user_data;" | ||
psql -c "ALTER TABLE personal_access_token ENABLE TRIGGER ALL;" | ||
psql -c "ALTER TABLE user_data ENABLE TRIGGER ALL;" |
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,9 @@ | ||
<LocationMatch "/openvsx/"> | ||
ProxyPass http://localhost:9000/ | ||
ProxyPassReverse http://localhost:9000/ | ||
Header add Access-Control-Allow-Origin "*" | ||
ProxyPreserveHost On | ||
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} | ||
RequestHeader set X-Forwarded-Prefix "/openvsx" | ||
</LocationMatch> | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.