-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88ca421
commit 1ff5c7c
Showing
3 changed files
with
88 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
. cico_setup.sh | ||
|
||
install_dependencies | ||
|
||
build_project | ||
|
||
run_int_tests |
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,18 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# Show command before executing | ||
set -x | ||
. cico_setup.sh | ||
|
||
set -e | ||
install_dependencies | ||
|
||
#npm install -g typescript | ||
build_project | ||
|
||
|
||
npm install | ||
npm run vscode:prepublish | ||
#npm install -g vsce | ||
vsce package | ||
|
||
#script: | ||
npm test --silent | ||
run_int_tests |
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,72 @@ | ||
#!/bin/bash -ex | ||
|
||
load_jenkins_vars() { | ||
if [ -e "jenkins-env" ]; then | ||
cat jenkins-env \ | ||
| grep -E "(DEVSHIFT_TAG_LEN|DEVSHIFT_USERNAME|DEVSHIFT_PASSWORD|JENKINS_URL|GIT_BRANCH|GIT_COMMIT|BUILD_NUMBER|ghprbSourceBranch|ghprbActualCommit|BUILD_URL|ghprbPullId)=" \ | ||
| sed 's/^/export /g' \ | ||
> ~/.jenkins-env | ||
source ~/.jenkins-env | ||
fi | ||
} | ||
|
||
prep() { | ||
yum -y update | ||
yum -y install git gcc-c++ bzip2 fontconfig | ||
curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash - | ||
yum -y install nodejs | ||
} | ||
|
||
install_dependencies() { | ||
# Build fabric8-analytics-vscode-extension | ||
npm install -g typescript | ||
npm install -g vsce | ||
npm install; | ||
#chmod +x /root/payload/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs | ||
|
||
if [ $? -eq 0 ]; then | ||
echo 'CICO: npm install : OK' | ||
else | ||
echo 'CICO: npm install : FAIL' | ||
exit 1 | ||
fi | ||
} | ||
|
||
# run_unit_tests() { | ||
# # Exec unit tests | ||
# npm run test:unit | ||
|
||
# if [ $? -eq 0 ]; then | ||
# echo 'CICO: unit tests OK' | ||
# else | ||
# echo 'CICO: unit tests FAIL' | ||
# exit 2 | ||
# fi | ||
# } | ||
|
||
build_project() { | ||
npm run vscode:prepublish | ||
vsce package | ||
|
||
if [ $? -eq 0 ]; then | ||
echo 'CICO: vsce prepublish OK' | ||
else | ||
echo 'CICO: vsce prepublish FAIL' | ||
exit 2 | ||
fi | ||
} | ||
|
||
run_int_tests() { | ||
# Exec integration tests | ||
npm test --silent | ||
|
||
if [ $? -eq 0 ]; then | ||
echo 'CICO: integration tests OK' | ||
else | ||
echo 'CICO: integration tests FAIL' | ||
exit 2 | ||
fi | ||
} | ||
|
||
load_jenkins_vars | ||
prep |