commit b72fecbbec598bfa608030243a4d0aa3a6158aa4 Author: Primakov Alexandr Date: Mon Mar 2 22:35:26 2020 +0300 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b1eea9e --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Vendor dll build +dlls + +# compiled output +/dist +/tmp + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/build/dev/Jenkinsfile b/build/dev/Jenkinsfile new file mode 100644 index 0000000..043fcf2 --- /dev/null +++ b/build/dev/Jenkinsfile @@ -0,0 +1,5 @@ +stage ('production build') { + steps { + sh 'npm run build' + } +} diff --git a/build/prod/Jenkinsfile b/build/prod/Jenkinsfile new file mode 100644 index 0000000..5fbaed0 --- /dev/null +++ b/build/prod/Jenkinsfile @@ -0,0 +1,5 @@ +stage ('production build') { + steps { + sh 'npm run build:prod' + } +} diff --git a/clone/Jenkinsfile b/clone/Jenkinsfile new file mode 100644 index 0000000..fd8b929 --- /dev/null +++ b/clone/Jenkinsfile @@ -0,0 +1,4 @@ +def loadApp(String addr) { + sh 'git clone ${addr} ./' + } +} diff --git a/install/Jenkinsfile b/install/Jenkinsfile new file mode 100644 index 0000000..29be46c --- /dev/null +++ b/install/Jenkinsfile @@ -0,0 +1,6 @@ +stage('install') { + steps { + echo 'starting installing' + sh 'npm install' + } +} \ No newline at end of file diff --git a/predeploy/Jenkinsfile b/predeploy/Jenkinsfile new file mode 100644 index 0000000..dd2249c --- /dev/null +++ b/predeploy/Jenkinsfile @@ -0,0 +1,22 @@ +stage ('predeploy') { + steps { + echo 'checking tag' + script { + if (sh(returnStdout: true, script: "git tag --contains").trim()) { + def tag = sh(returnStdout: true, script: "git tag --contains").trim() + echo 'found tag ' + tag + sh "cd dist ; echo 'mkdir ${tag}; mv ./master/* ./${tag}; rm -r -d ./master; rm version.sh' > version.sh" + } else { + echo 'tag not found' + sh "cd dist ; echo 'rm version.sh' > version.sh" + } + } + } + + stage ('archiving') { + steps { + // Archive the build output artifacts. + archiveArtifacts artifacts: 'dist/*' + } + } +} diff --git a/prepare/Jenkinsfile b/prepare/Jenkinsfile new file mode 100644 index 0000000..d8cbbea --- /dev/null +++ b/prepare/Jenkinsfile @@ -0,0 +1,7 @@ +stage('prepare') { + steps { + sh 'rm -rf .[!.]*' + sh 'rm -rf ./*' + sh 'ls -a' + } +} diff --git a/publish/Jenkinsfile b/publish/Jenkinsfile new file mode 100644 index 0000000..42d1475 --- /dev/null +++ b/publish/Jenkinsfile @@ -0,0 +1,14 @@ +stage ('publish') { + steps { + echo 'checking tag' + script { + def tag = sh(returnStdout: true, script: "git tag --contains").trim() + if (tag) { + echo 'found tag ' + tag + sh 'npm publish' + } else { + echo 'tag not found' + } + } + } +} diff --git a/stats/Jenkinsfile b/stats/Jenkinsfile new file mode 100644 index 0000000..0cdcedd --- /dev/null +++ b/stats/Jenkinsfile @@ -0,0 +1,10 @@ +stage('stats') { + steps { + sh 'node -v' + sh 'npm -v' + sh 'ls -a' + sh 'df -h' + sh 'free -m' + sh 'vmstat -s' + } +} diff --git a/ui/Jenkinsfile b/ui/Jenkinsfile new file mode 100644 index 0000000..b1635d6 --- /dev/null +++ b/ui/Jenkinsfile @@ -0,0 +1,6 @@ +stage('ui tests') { + steps { + echo 'ui tests' + sh 'npm run test:ui' + } +} diff --git a/unit/Jenkinsfile b/unit/Jenkinsfile new file mode 100644 index 0000000..f7bede6 --- /dev/null +++ b/unit/Jenkinsfile @@ -0,0 +1,6 @@ +stage('unit tests') { + steps { + echo 'runing tests...' + sh 'npm run test' + } +} \ No newline at end of file