Skip to content

Commit

Permalink
Merge pull request #7596 from spalger/implement/versionedCiScript
Browse files Browse the repository at this point in the history
[ci] move ci setup tasks into source control
  • Loading branch information
spalger authored Jun 30, 2016
2 parents 55bd8c0 + 995c408 commit 931d5a0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/scripts/jenkins_build_snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

"$(dirname $0)/jenkins_setup.sh"

"$(npm bin)/grunt" build;
33 changes: 33 additions & 0 deletions test/scripts/jenkins_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

set -e

###*****###
### CWD ###
###*****###
if [ -n "$WORKSPACE" ]; then
cd "$WORKSPACE"
else
echo 'Unable to find the $WORKSPACE environment variable, is this jenkins?'
exit 1
fi


###*****###
### NVM ###
###*****###
export NVM_DIR="/var/lib/jenkins/.nvm"
NVM_SCRIPT="$NVM_DIR/nvm.sh"
if [ -s "$NVM_SCRIPT" ]; then
. "$NVM_SCRIPT" # load nvm
else
echo "Unable to find the nvm script at \"$NVM_SCRIPT\""
exit 1
fi

nvm install "$(cat .node-version)"

###*****###
### NPM ###
###*****###
npm install
7 changes: 7 additions & 0 deletions test/scripts/jenkins_unit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

"$(dirname $0)/jenkins_setup.sh"

"$(npm bin)/grunt" jenkins;

0 comments on commit 931d5a0

Please sign in to comment.