This commit is contained in:
Tommy Parnell
2018-05-18 10:51:05 -04:00
parent ed6b9b5e75
commit 5d715bdff9
7 changed files with 2322 additions and 114 deletions

View File

@@ -1,2 +1,2 @@
[config]
command = deploy.cmd
command = bash deploy.sh

1
.gitignore vendored
View File

@@ -28,3 +28,4 @@ node_modules
.lock-wscript
#index.html
index.html

View File

@@ -1,99 +0,0 @@
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------
:: Prerequisites
:: -------------
:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
goto error
)
:: Setup
:: -----
setlocal enabledelayedexpansion
SET ARTIFACTS=%~dp0%..\artifacts
IF NOT DEFINED DEPLOYMENT_SOURCE (
SET DEPLOYMENT_SOURCE=%~dp0%.
)
IF NOT DEFINED DEPLOYMENT_TARGET (
SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
IF NOT DEFINED NEXT_MANIFEST_PATH (
SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest
IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
)
)
IF NOT DEFINED KUDU_SYNC_CMD (
:: Install kudu sync
echo Installing Kudu Sync
call npm install kudusync -g --silent
IF !ERRORLEVEL! NEQ 0 goto error
:: Locally just running "kuduSync" would also work
SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
REM Use the Executecmd macro to execute and validate the command worked
echo Building Resume
call :Executecmd npm install
IF !ERRORLEVEL! NEQ 0 goto error
REM This creates the **index.html** which is deployed by Azure Websites.
call :Executecmd node .\node_modules\resume-cli\index.js export index -f html --theme elegant
IF !ERRORLEVEL! NEQ 0 goto error
:: 1. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
IF !ERRORLEVEL! NEQ 0 goto error
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error
goto end
:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%
:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul
:exitSetErrorLevel
exit /b 1
:exitFromFunction
()
:end
endlocal
echo Finished successfully.

125
deploy.sh Normal file
View File

@@ -0,0 +1,125 @@
#!/bin/bash
# ----------------------
# KUDU Deployment Script
# Version: 1.0.17
# ----------------------
# Helpers
# -------
exitWithMessageOnError () {
if [ ! $? -eq 0 ]; then
echo "An error has occurred during web site deployment."
echo $1
exit 1
fi
}
# Prerequisites
# -------------
# Verify node.js installed
hash node 2>/dev/null
exitWithMessageOnError "Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment."
# Setup
# -----
SCRIPT_DIR="${BASH_SOURCE[0]%\\*}"
SCRIPT_DIR="${SCRIPT_DIR%/*}"
ARTIFACTS=$SCRIPT_DIR/../artifacts
KUDU_SYNC_CMD=${KUDU_SYNC_CMD//\"}
if [[ ! -n "$DEPLOYMENT_SOURCE" ]]; then
DEPLOYMENT_SOURCE=$SCRIPT_DIR
fi
if [[ ! -n "$NEXT_MANIFEST_PATH" ]]; then
NEXT_MANIFEST_PATH=$ARTIFACTS/manifest
if [[ ! -n "$PREVIOUS_MANIFEST_PATH" ]]; then
PREVIOUS_MANIFEST_PATH=$NEXT_MANIFEST_PATH
fi
fi
if [[ ! -n "$DEPLOYMENT_TARGET" ]]; then
DEPLOYMENT_TARGET=$ARTIFACTS/wwwroot
else
KUDU_SERVICE=true
fi
if [[ ! -n "$KUDU_SYNC_CMD" ]]; then
# Install kudu sync
echo Installing Kudu Sync
npm install kudusync -g --silent
exitWithMessageOnError "npm failed"
if [[ ! -n "$KUDU_SERVICE" ]]; then
# In case we are running locally this is the correct location of kuduSync
KUDU_SYNC_CMD=kuduSync
else
# In case we are running on kudu service this is the correct location of kuduSync
KUDU_SYNC_CMD=$APPDATA/npm/node_modules/kuduSync/bin/kuduSync
fi
fi
# Node Helpers
# ------------
selectNodeVersion () {
if [[ -n "$KUDU_SELECT_NODE_VERSION_CMD" ]]; then
SELECT_NODE_VERSION="$KUDU_SELECT_NODE_VERSION_CMD \"$DEPLOYMENT_SOURCE\" \"$DEPLOYMENT_TARGET\" \"$DEPLOYMENT_TEMP\""
eval $SELECT_NODE_VERSION
exitWithMessageOnError "select node version failed"
if [[ -e "$DEPLOYMENT_TEMP/__nodeVersion.tmp" ]]; then
NODE_EXE=`cat "$DEPLOYMENT_TEMP/__nodeVersion.tmp"`
exitWithMessageOnError "getting node version failed"
fi
if [[ -e "$DEPLOYMENT_TEMP/__npmVersion.tmp" ]]; then
NPM_JS_PATH=`cat "$DEPLOYMENT_TEMP/__npmVersion.tmp"`
exitWithMessageOnError "getting npm version failed"
fi
if [[ ! -n "$NODE_EXE" ]]; then
NODE_EXE=node
fi
NPM_CMD="\"$NODE_EXE\" \"$NPM_JS_PATH\""
else
NPM_CMD=npm
NODE_EXE=node
fi
}
##################################################################################################################################
# Deployment
# ----------
echo Handling node.js deployment.
# 1. KuduSync
if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
"$KUDU_SYNC_CMD" -v 50 -f "$DEPLOYMENT_SOURCE" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
exitWithMessageOnError "Kudu Sync failed"
fi
# 2. Select node version
selectNodeVersion
# 3. Install npm packages
if [ -e "$DEPLOYMENT_TARGET/package.json" ]; then
cd "$DEPLOYMENT_TARGET"
echo "Running $NPM_CMD install --production"
eval $NPM_CMD install --production
exitWithMessageOnError "npm failed"
cd - > /dev/null
fi
# 4. Generate site
npm run build
##################################################################################################################################
echo "Finished successfully."

2178
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,11 @@
"email": ""
},
"scripts": {
"test": "node ./node_modules/resume-cli/index.js export index -f html"
"test": "node ./node_modules/resume-cli/index.js export index -f html",
"build": "resume export index -f html --theme elegant"
},
"dependencies": {
"resume-cli": "^0.4.13"
"jsonresume-theme-elegant": "^1.11.2",
"resume-cli": "^0.4.19"
}
}

View File

@@ -33,11 +33,13 @@
"position": "Software Engineer II",
"website": "http://vistaprint.com",
"startDate": "2015-01-01",
"summary": "I work on the gallery team at Vistaprint. We own anything that could be a gallery, and keyword search.",
"summary": "I work on the gallery team at Vistaprint. We built a platform where designers could create content with multi-hierarchical filterable dimensions. ",
"highlights": [
"Built on React.js, ES6, and Redux. I worked on our very client side heavy SPA.",
"Maintained and improved our dotnet, and dotnet core based backends",
"I lead the charge on our transition to the cloud brining in Terraform and Docker for our microservices, and utilizing Puppet, and Packer for our non-dockerized systems"
"Maintained and improved our dotnet, and dotnet core based backends.",
"I was part of an effort to reduce our page load time on average by 3 seconds. I rewrote, and optimized many slow functions",
"I lead the charge on our transition to the cloud brining in Terraform and Docker for our microservices, and utilizing Puppet, and Packer for our non-dockerized systems",
"I championed configuration as code for our cloud accounts. All of our infrastructure from jenkins jobs, to cloud infrastrucutre was defined with code."
]
},
{
@@ -46,11 +48,12 @@
"website": "vistaprint.com",
"startDate": "2011-05-01",
"endDate": "2015-01-01",
"summary": "DevOps Engineer, Technical lead for our monitoring team.",
"summary": "DevOps Engineer, Technical lead for our monitoring team. I was responsible for monitoring Vistaprint's globally geo-distributed infrastructure. ",
"highlights": [
"Wrote and maintained a custom monitoring platform written in C#",
"Wrote our own version of pagerduty in C#",
"Created tooling to support the uptime of our infrastructure"
"Created tooling to support the uptime of our infrastructure",
"Built tools and processes to aid in our efforts of triaging large problems"
]
},
{
@@ -131,19 +134,18 @@
"skills": [
{
"name": "Software Languages",
"level": "Master",
"level": "",
"keywords": [
"C# ",
"JavaScript",
"Dart",
"Ruby",
"Go",
"SQL"
"MS SQL"
]
},
{
"name": "CI Tools",
"level": "Master",
"level": "",
"keywords": [
"Vagrant",
"Puppet",
@@ -156,7 +158,7 @@
},
{
"name": "Software Platforms",
"level": "Master",
"level": "",
"keywords": [
"Xamarin",
"MVC 5",
@@ -182,7 +184,6 @@
"name": "Music",
"keywords": [
"Guitar",
"Cello",
"Piano"
]
},