-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove Jenkinsfile - Update repo script to allow defining the protocol (ssh vs https)
- Loading branch information
Showing
5 changed files
with
105 additions
and
22 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 |
---|---|---|
|
@@ -49,7 +49,6 @@ jobs: | |
name: Playwright Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: true | ||
STANDALONE_URL: 'file://${{ github.workspace }}/examples/workflow-test/repositories/glsp-client/examples/workflow-standalone/app/diagram.html' | ||
THEIA_URL: 'http://localhost:3000' | ||
VSCODE_VSIX_ID: 'eclipse-glsp.workflow-vscode-example' | ||
|
@@ -67,11 +66,14 @@ jobs: | |
- name: Install dependencies | ||
run: yarn install | ||
- name: Prepare repos | ||
run: yarn repo prepare | ||
run: yarn repo prepare --protocol https | ||
- name: Start theia | ||
run: yarn repo theia-integration start & | ||
- name: Run Playwright tests | ||
run: yarn test | ||
run: xvfb-run -a yarn test:theia | ||
continue-on-error: true | ||
- name: Upload Playwright report | ||
uses: actions/[email protected] | ||
with: | ||
name: playwright-report | ||
path: glsp-playwright/examples/workflow-test/playwright-report/ | ||
path: examples/workflow-test/playwright-report/ |
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 |
---|---|---|
|
@@ -28,6 +28,7 @@ interface GlobalOptions { | |
interface CloneOptions extends GlobalOptions { | ||
override?: 'rename' | 'remove'; | ||
branch?: string; | ||
protocol: 'ssh' | 'https'; | ||
} | ||
|
||
// ========== Constants ======================================================== // | ||
|
@@ -78,7 +79,9 @@ function clone(repository: string, options: CloneOptions): void { | |
} | ||
} | ||
|
||
exec('git', ['clone', `[email protected]:eclipse-glsp/${repository}.git`, ...branch, destination]); | ||
const remote = | ||
options.protocol === 'ssh' ? `[email protected]:eclipse-glsp/${repository}.git` : `https://github.com/eclipse-glsp/${repository}.git`; | ||
exec('git', ['clone', remote, ...branch, destination]); | ||
} | ||
|
||
function log(repository: string, options: GlobalOptions): void { | ||
|
@@ -124,24 +127,34 @@ async function main(): Promise<void> { | |
'prepare', | ||
'Clones and builds all projects', | ||
b => | ||
b.options('override', { | ||
choices: ['rename', 'remove'], | ||
description: 'Rename or remove if the folder already exists', | ||
type: 'string' | ||
} as const), | ||
b | ||
.options('override', { | ||
choices: ['rename', 'remove'], | ||
description: 'Rename or remove if the folder already exists', | ||
type: 'string' | ||
} as const) | ||
.options('protocol', { | ||
choices: ['ssh', 'https'], | ||
description: 'Protocol to use for cloning', | ||
type: 'string', | ||
default: 'ssh' | ||
} as const), | ||
argv => { | ||
const { folder, override } = argv; | ||
const { folder, override, protocol } = argv; | ||
clone(clientRepository, { | ||
folder, | ||
override | ||
override, | ||
protocol | ||
}); | ||
clone(theiaRepository, { | ||
folder, | ||
override | ||
override, | ||
protocol | ||
}); | ||
clone(vsCodeRepository, { | ||
folder, | ||
override | ||
override, | ||
protocol | ||
}); | ||
buildClient(argv); | ||
buildTheia(argv); | ||
|
@@ -170,11 +183,12 @@ async function main(): Promise<void> { | |
'Client', | ||
subCommands([ | ||
cloneCommand(argv => { | ||
const { folder, branch, override } = argv; | ||
const { folder, branch, override, protocol } = argv; | ||
clone(clientRepository, { | ||
folder, | ||
branch, | ||
override | ||
override, | ||
protocol | ||
}); | ||
}), | ||
buildCommand(argv => { | ||
|
@@ -187,11 +201,12 @@ async function main(): Promise<void> { | |
'Theia integration', | ||
subCommands([ | ||
cloneCommand(argv => { | ||
const { folder, branch, override } = argv; | ||
const { folder, branch, override, protocol } = argv; | ||
clone(theiaRepository, { | ||
folder, | ||
branch, | ||
override | ||
override, | ||
protocol | ||
}); | ||
}), | ||
buildCommand(argv => { | ||
|
@@ -215,11 +230,12 @@ async function main(): Promise<void> { | |
'VSCode integration', | ||
subCommands([ | ||
cloneCommand(argv => { | ||
const { folder, branch, override } = argv; | ||
const { folder, branch, override, protocol } = argv; | ||
clone(vsCodeRepository, { | ||
folder, | ||
branch, | ||
override | ||
override, | ||
protocol | ||
}); | ||
}), | ||
buildCommand(argv => { | ||
|
@@ -255,6 +271,12 @@ function cloneCommand(handler: (argv: CloneCommandArgv) => void) { | |
description: 'Rename or remove if the folder already exists', | ||
type: 'string' | ||
} as const) | ||
.options('protocol', { | ||
choices: ['ssh', 'https'], | ||
description: 'Protocol to use for cloning', | ||
type: 'string', | ||
default: 'ssh' | ||
} as const) | ||
.positional('branch', { describe: 'Branch or tag', type: 'string' }), | ||
argv => { | ||
handler(argv); | ||
|
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