refactor(ci): add start.sh

parent 59218190
{
"extends": "google",
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": true,
"impliedStrict": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"no-multiple-empty-lines": ["error", {"max": 2}],
"curly": ["error", "multi"],
"quotes": ["error", "single"],
"arrow-parens": ["error", "always"]
}
}
......@@ -5,8 +5,6 @@ stages:
variables:
BUILD_PATH: "www/dist"
STAGING_URL: "http://staging.1.dev.1119.zolotoykod.ru"
PRODUCTION_URL: "http://production.1.dev.1119.zolotoykod.ru"
status:
stage: startup
......@@ -20,7 +18,7 @@ status:
docker:
stage: startup
script:
- docker-compose up -d
- /bin/bash start.sh
only:
- master
......@@ -35,7 +33,7 @@ staging:
- www/vendor/
environment:
name: staging
url: $STAGING_URL
url: http://staging.1.dev.1119.zolotoykod.ru
artifacts:
paths:
- $BUILD_PATH
......@@ -52,6 +50,6 @@ production:
GIT_STRATEGY: none
environment:
name: production
url: $PRODUCTION_URL
url: http://production.1.dev.1119.zolotoykod.ru
only:
- tags
#!/bin/bash
export ARTIFACTS_PATH="$HOME/localartifacts/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PIPELINE_ID/"
mkdir -p $ARTIFACTS_PATH
tar -czf bitrix.tar.gz www/bitrix/ www/upload/
mv bitrix.tar.gz $ARTIFACTS_PATH
#!/bin/bash
export ARTIFACTS_PATH="$HOME/localartifacts/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PIPELINE_ID/"
cp $ARTIFACTS_PATH/bitrix.tar.gz .
tar -xzf bitrix.tar.gz
rm -f bitrix.tar.gz
#!/bin/bash
export USER_ID="$(id -u `whoami`)"
export GROUP_ID="$(id -g `whoami`)"
docker-compose up -d
This diff is collapsed.
'use strict';
const path = require('path');
const startanull = require('startanull');
// let templatePath = 'local/templates/[template_name]';
let templatePath = '';
let srcDir = path.resolve(__dirname, templatePath, 'src');
let resDir = path.resolve(__dirname, templatePath, 'dist');
let conf = {};
let gulp = conf.gulp = require('gulp');
// BrowserSync
conf.browserSyncOpts = {
proxy: 'dev-1-9927.zk.dev'
};
conf.browserSyncWatch = [
resDir + path.sep + '**',
'!' + srcDir + path.sep + '**'
];
// Styles
conf.stylesSrc = path.resolve(srcDir, 'styles') + path.sep + 'style.less';
conf.stylesDest = path.resolve(resDir, 'css');
conf.stylesWatch = [
path.resolve(srcDir, 'styles') + `${path.sep}**${path.sep}*.less`
];
// Scripts
conf.scriptsSrc = path.resolve(srcDir, 'scripts') + path.sep + 'main.js';
conf.scriptsDest = path.resolve(resDir, 'js');
conf.scriptsWebpack = {};
conf.scriptsWebpack.output = {
filename: '[name].js'
};
conf.scriptsWebpack.devtool = 'eval';
conf.scriptsWebpack.module = {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015']
}
}
]
};
// Templates
conf.templatesSrc = path.resolve(srcDir, 'pug') + path.sep + '*.pug';
conf.templatesDest = resDir;
conf.templatesWatch = '';
conf.templatesPugOpts = {
locals: {},
pretty: true
};
startanull(conf);
{
"author": "Constantine Karnaukhov <genteelknight@gmail.com>",
"devDependencies": {
"gulp": "^3.9.1",
"startanull": "^1.1.1"
},
"dependencies": {
"jquery": "2.2.*",
"uikit": "^2.27.1"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment