Merge branch 'dev' into 6184-saveCmr
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
21d047c21f
|
@ -5,9 +5,15 @@ def FROM_GIT
|
||||||
def RUN_TESTS
|
def RUN_TESTS
|
||||||
def RUN_BUILD
|
def RUN_BUILD
|
||||||
|
|
||||||
|
def BRANCH_ENV = [
|
||||||
|
test: 'test',
|
||||||
|
master: 'production'
|
||||||
|
]
|
||||||
|
|
||||||
node {
|
node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
env.NODE_ENV = 'dev'
|
env.BACK_REPLICAS = 1
|
||||||
|
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
||||||
|
|
||||||
PROTECTED_BRANCH = [
|
PROTECTED_BRANCH = [
|
||||||
'dev',
|
'dev',
|
||||||
|
|
44
gulpfile.js
44
gulpfile.js
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
require('require-yaml');
|
require('require-yaml');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const PluginError = require('plugin-error');
|
const PluginError = require('plugin-error');
|
||||||
|
@ -67,19 +68,40 @@ back.description = `Starts backend and database service`;
|
||||||
|
|
||||||
const defaultTask = gulp.parallel(front, back);
|
const defaultTask = gulp.parallel(front, back);
|
||||||
defaultTask.description = `Starts all application services`;
|
defaultTask.description = `Starts all application services`;
|
||||||
function install() {
|
async function install() {
|
||||||
const install = require('gulp-install');
|
const spawn = require('child_process').spawn;
|
||||||
const print = require('gulp-print');
|
|
||||||
|
|
||||||
let npmArgs = [];
|
console.log('-> Installing global packages...');
|
||||||
if (argv.ci) npmArgs = ['--no-audit', '--prefer-offline'];
|
await pnpmInstall();
|
||||||
|
|
||||||
let packageFiles = ['front/package.json', 'print/package.json'];
|
const modules = ['front', 'print'];
|
||||||
return gulp.src(packageFiles)
|
for (const module of modules) {
|
||||||
.pipe(print(filepath => {
|
console.log(`-> Installing '${module}' packages...`);
|
||||||
return `Installing packages in ${filepath}`;
|
await pnpmInstall(module);
|
||||||
}))
|
}
|
||||||
.pipe(install({npm: npmArgs}));
|
|
||||||
|
async function pnpmInstall(prefix) {
|
||||||
|
let args = ['install', '--prefer-offline'];
|
||||||
|
if (prefix) args = args.concat(['--prefix', prefix]);
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
stdio: [
|
||||||
|
process.stdin,
|
||||||
|
process.stdout,
|
||||||
|
process.stderr
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
const child = spawn('pnpm', args, options);
|
||||||
|
child.on('exit', code => {
|
||||||
|
if (code !== 0)
|
||||||
|
reject(new Error(`pnpm exit code ${code}`));
|
||||||
|
else
|
||||||
|
resolve(code);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
install.description = `Installs node dependencies in all directories`;
|
install.description = `Installs node dependencies in all directories`;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
|
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/register": "^7.7.7",
|
"@babel/register": "^7.7.7",
|
||||||
"@verdnatura/myt": "^1.6.5",
|
"@verdnatura/myt": "^1.6.6",
|
||||||
"angular-mocks": "^1.7.9",
|
"angular-mocks": "^1.7.9",
|
||||||
"babel-jest": "^26.0.1",
|
"babel-jest": "^26.0.1",
|
||||||
"babel-loader": "^8.2.4",
|
"babel-loader": "^8.2.4",
|
||||||
|
|
|
@ -128,8 +128,8 @@ devDependencies:
|
||||||
specifier: ^7.7.7
|
specifier: ^7.7.7
|
||||||
version: 7.23.7(@babel/core@7.23.9)
|
version: 7.23.7(@babel/core@7.23.9)
|
||||||
'@verdnatura/myt':
|
'@verdnatura/myt':
|
||||||
specifier: ^1.6.5
|
specifier: ^1.6.6
|
||||||
version: 1.6.5
|
version: 1.6.6
|
||||||
angular-mocks:
|
angular-mocks:
|
||||||
specifier: ^1.7.9
|
specifier: ^1.7.9
|
||||||
version: 1.8.3
|
version: 1.8.3
|
||||||
|
@ -2633,8 +2633,8 @@ packages:
|
||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@verdnatura/myt@1.6.5:
|
/@verdnatura/myt@1.6.6:
|
||||||
resolution: {integrity: sha512-0h7FvhSewd2W9EOymc59YymZJOBfCXmY5CWNFhol1yBfWSOOF9JAEE9DKRMbKaMqd/5Dy9LriS5PYOfeqm3HjA==}
|
resolution: {integrity: sha512-5KHi9w1baEQ6Oe/pAR8pl0oD5yyJJuPirE+ZhygreUGGURfig4VekjhlGE3WEbWquDiIAMi89J1VQ+1Ba0+jQw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sqltools/formatter': 1.2.5
|
'@sqltools/formatter': 1.2.5
|
||||||
|
|
Loading…
Reference in New Issue