-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # readme.md
- Loading branch information
Showing
13 changed files
with
454 additions
and
29 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
exec.log | ||
bdd-log.xml | ||
*.ospx | ||
coverage/ |
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,94 @@ | ||
|
||
pipeline { | ||
agent none | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '7')) | ||
skipDefaultCheckout() | ||
} | ||
|
||
stages { | ||
stage('Тестирование кода пакета WIN') { | ||
|
||
agent { label 'windows' } | ||
|
||
steps { | ||
checkout scm | ||
|
||
script { | ||
if( fileExists ('tasks/test.os') ){ | ||
bat 'chcp 65001 > nul && oscript tasks/test.os' | ||
|
||
junit allowEmptyResults: true, testResults: 'tests.xml' | ||
junit allowEmptyResults: true, testResults: 'bdd-log.xml' | ||
} | ||
else | ||
echo 'no testing task' | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
stage('Тестирование кода пакета LINUX') { | ||
|
||
agent { label 'master' } | ||
|
||
steps { | ||
echo 'under development' | ||
} | ||
|
||
} | ||
|
||
stage('Сборка пакета') { | ||
|
||
agent { label 'windows' } | ||
|
||
steps { | ||
checkout scm | ||
|
||
bat 'erase /Q *.ospx' | ||
bat 'chcp 65001 > nul && call opm build .' | ||
|
||
stash includes: '*.ospx', name: 'package' | ||
archiveArtifacts '*.ospx' | ||
} | ||
|
||
} | ||
|
||
stage('Публикация в хабе') { | ||
when { | ||
branch 'master' | ||
} | ||
agent { label 'master' } | ||
steps { | ||
sh 'rm -f *.ospx' | ||
unstash 'package' | ||
|
||
sh ''' | ||
artifact=`ls -1 *.ospx` | ||
basename=`echo $artifact | sed -r 's/(.+)-.*(.ospx)/\\1/'` | ||
cp $artifact $basename.ospx | ||
sudo rsync -rv *.ospx /var/www/hub.oscript.io/download/$basename/ | ||
'''.stripIndent() | ||
} | ||
} | ||
|
||
stage('Публикация в нестабильном хабе') { | ||
when { | ||
branch 'develop' | ||
} | ||
agent { label 'master' } | ||
steps { | ||
sh 'rm -f *.ospx' | ||
unstash 'package' | ||
|
||
sh ''' | ||
artifact=`ls -1 *.ospx` | ||
basename=`echo $artifact | sed -r 's/(.+)-.*(.ospx)/\\1/'` | ||
cp $artifact $basename.ospx | ||
sudo rsync -rv *.ospx /var/www/hub.oscript.io/dev-channel/$basename/ | ||
'''.stripIndent() | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.