-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(verdaccio): e2e pipeline, nx-cmake still needs fixing
- Loading branch information
1 parent
60cb5e2
commit 13e0d6b
Showing
29 changed files
with
91 additions
and
76 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { e2eSingle } from '../lib/single-e2e'; | ||
const [, , target] = process.argv; | ||
e2eSingle(target); |
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,7 @@ | ||
import { startLocalRegistry } from '../lib/startLocalRegistry'; | ||
|
||
startLocalRegistry(); | ||
const registryProcess = startLocalRegistry(); | ||
if (registryProcess) { | ||
console.log('Local registry started on port 4873'); | ||
registryProcess.unref(); | ||
} |
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,7 @@ | ||
import { exit } from 'node:process'; | ||
import { stopLocalRegistry } from '../lib/stopLocalRegistry'; | ||
|
||
stopLocalRegistry(null); | ||
if (!process.env['SKIP']) { | ||
exit(0); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { e2e } from './lib/e2e'; | ||
export { e2eSingle } from './lib/single-e2e'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import { execSync } from 'child_process'; | ||
import { port } from '../config/port'; | ||
import { registry } from '../config/registry'; | ||
import { hostname } from '../config/hostname'; | ||
|
||
export const setLocalRegistry = () => { | ||
process.env['npm_config_registry'] = registry; | ||
const cmd = `npm config set //${hostname}:${port}/:_authToken "secretVerdaccioToken"`; | ||
process.env['npm_config_registry'] = 'http://localhost:4873'; | ||
const cmd = `npm config set //localhost:4873/:_authToken "secretVerdaccioToken"`; | ||
execSync(cmd); | ||
console.log('Set npm config registry to ' + registry); | ||
console.log('Set npm config registry to ' + 'http://localhost:4873'); | ||
}; |
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,24 @@ | ||
import { execSync } from 'node:child_process'; | ||
import { exit } from 'node:process'; | ||
import { startLocalRegistry } from './startLocalRegistry'; | ||
import { stopLocalRegistry } from './stopLocalRegistry'; | ||
|
||
export const e2eSingle = (target: string) => { | ||
const registryProcess = startLocalRegistry(); | ||
const head = process.env['NX_HEAD'] | ||
? `--head=${process.env['NX_HEAD']}` | ||
: ''; | ||
const base = process.env['NX_BASE'] | ||
? `--base=${process.env['NX_BASE']}` | ||
: ''; | ||
const cmd = `nx run-e2e ${target} --nx-bail --output-style=stream --configuration=ci ${base} ${head}`; | ||
execSync(cmd, { | ||
stdio: 'inherit', | ||
env: { | ||
...process.env, | ||
SKIP: 'true', | ||
}, | ||
}); | ||
stopLocalRegistry(registryProcess); | ||
exit(0); | ||
}; |
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,23 +1,18 @@ | ||
import { ChildProcess, spawn } from 'child_process'; | ||
import { localRegistryTarget } from './localRegistryTarget'; | ||
import { port } from '../config/port'; | ||
import { project } from '../config/project'; | ||
import { setLocalRegistry } from './setLocalRegistry'; | ||
|
||
export const startLocalRegistry = (): ChildProcess | null => { | ||
if (process.env['SKIP']) { | ||
console.log('Skipping start'); | ||
return null; | ||
} | ||
const childProcess = spawn('nx', [localRegistryTarget, project], { | ||
stdio: 'inherit', | ||
setLocalRegistry(); | ||
const childProcess = spawn('nx', ['local-registry', 'verdaccio'], { | ||
stdio: 'pipe', | ||
detached: true, | ||
env: { | ||
...process.env, | ||
}, | ||
}); | ||
childProcess.unref(); | ||
console.log('Local registry started on port ' + port); | ||
setLocalRegistry(); | ||
return childProcess; | ||
}; |
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,7 +1,5 @@ | ||
import { execSync } from 'child_process'; | ||
import { port } from '../config/port'; | ||
import { hostname } from '../config/hostname'; | ||
|
||
export const unsetLocalRegistry = () => { | ||
execSync(`npm config delete //${hostname}:${port}/:_authToken`); | ||
execSync(`npm config delete //localhost:4873/:_authToken`); | ||
}; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.