Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #957 from microsoft/myho/mergeDevelop
Browse files Browse the repository at this point in the history
release: merge develop to master
  • Loading branch information
mydiemho committed May 7, 2020
2 parents c1afb7e + 9154f51 commit 94daa11
Show file tree
Hide file tree
Showing 49 changed files with 10,875 additions and 55 deletions.
13 changes: 13 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 1

update_configs:
target_branch: "develop"

# Keep package.json (& lockfiles) up to date weekly
- package_manager: "javascript"
directory: "/"
update_schedule: "weekly"

default_labels:
- "dependencies"
- "dependabot"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand All @@ -37,3 +38,8 @@ secrets.sh
# complexity reports
es6-src/
report/

# VoTT Server
server/lib
server/node_modules
server/coverage
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ VoTT helps facilitate an end-to-end machine learning pipeline:

<!-- toc -->


- [VoTT (Visual Object Tagging Tool)](#vott-visual-object-tagging-tool)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- job: MacOS
pool:
vmImage: macOS-10.13
vmImage: macOS-10.15
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
Expand All @@ -26,7 +26,7 @@ jobs:

- job: Windows
pool:
vmImage: win1803
vmImage: "windows-2019"
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/plato/generate-up-to-date-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ steps:
- task: AzureCLI@1
displayName: "Pull down old report and add updates"
inputs:
azureSubscription: 'PELITTLE TEAM - CSE DWR (d36d0808-a967-4f73-9fdc-32ea232fc81d)'
azureSubscription: 'pj-little-sub'
scriptLocation: inlineScript
inlineScript: './scripts/update-report.sh'

Expand Down
28 changes: 28 additions & 0 deletions azure-pipelines/templates/build-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#job-templates-with-parameters
jobs:
- job: ${{ parameters.name }}
pool: ${{ parameters.pool }}
timeoutInMinutes: 15 # how long to run the job before automatically cancelling
steps:
- task: NodeTool@0
displayName: 'Use Node 10.x'
inputs:
versionSpec: 10.x

- bash: |
set -ex
# clean install
npm ci
npm run release-ci
OS=${{ parameters.os }}
ARTIFACT_NAME=${{ parameters.artifact }}
mkdir -p ${OS}
cp releases/${ARTIFACT_NAME} ${OS}/
displayName: Build
- publish: $(System.DefaultWorkingDirectory)/${{ parameters.os }}
artifact: ${{ parameters.os }}
32 changes: 32 additions & 0 deletions azure-pipelines/templates/create-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
parameters:
GitHubConnection: '' # defaults for any parameters that aren't specified
repositoryName: ''
releaseNotesSource: input
addChangeLog: false
isPreRelease: true
isDraft: true

jobs:
- job: Create_Github_Release
timeoutInMinutes: 30 # timeout on job if deploy is not completed in 30 minutes
pool:
vmImage: ubuntu-16.04
steps:
- checkout: none # we already have the artifacts built, don't need the code

- download: current

- task: GitHubRelease@0
displayName: 'GitHub release (create)'
inputs:
gitHubConnection: ${{ parameters.GitHubConnection }}
repositoryName: ${{ parameters.repositoryName }}
releaseNotesSource: ${{ parameters.releaseNotesSource }}
target: $(Build.SourceBranch)
assets: |
../linux/*
../windows/*
../mac/*
addChangeLog: ${{ parameters.addChangeLog }}
isDraft: true # for testing, change to true when ready to merge
isPreRelease: ${{ parameters.isPrelease }}
10 changes: 9 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"buffer-reverse": "^1.0.1",
"crypto-js": "^3.1.9-1",
"dotenv": "^7.0.0",
"express-request-id": "^1.4.1",
"google-protobuf": "^3.6.1",
"jpeg-js": "^0.3.4",
"json2csv": "^4.5.0",
Expand Down
88 changes: 88 additions & 0 deletions preview-release-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
trigger: none # manual queue only when we're ready to release
pr: none # disable CI build for PR

stages:
- stage: version_bump_commit
jobs:
- job: "version_bump"

variables:
- group: GitHub-Deploy-Creds

timeoutInMinutes: 30 # timeout on job if deploy is not completed in 30 minutes
cancelTimeoutInMinutes: 1 # time limit to wait for job to cancel

pool:
vmImage: macOS-10.15 # ssh key was generated on a Mac so using the same type of OS here

steps:
- task: NodeTool@0
inputs:
versionSpec: 10.x
displayName: 'Install Node.js'

# Download secure file
# Download a secure file to the agent machine
- task: DownloadSecureFile@1
# name: sshKey # The name with which to reference the secure file's path on the agent, like $(mySecureFile.secureFilePath)
inputs:
secureFile: vott_id_rsa

# Install an SSH key prior to a build or deployment
- task: InstallSSHKey@0 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-ssh-key?view=azure-devops
inputs:
knownHostsEntry: $(KNOWN_HOSTS_ENTRY)
sshPublicKey: $(SSH_PUBLIC_KEY)
#sshPassphrase: # Optional
sshKeySecureFile: vott_id_rsa
env:
KNOWN_HOSTS_ENTRY: $(KNOWN_HOSTS_ENTRY)
SSH_PUBLIC_KEY: $(SSH_PUBLIC_KEY) # map to the right format (camelCase) that Azure credentials understand

- task: Bash@3
name: BumpNpmVersion
displayName: Bump NPM Prerelease Version
inputs:
targetType: filePath
filePath: ./scripts/version-bump-commit.sh
env:
SOURCE_BRANCH: $(Build.SourceBranch)

- stage: package_build
dependsOn: version_bump_commit
jobs:
- template: azure-pipelines/templates/build-artifact.yml
parameters:
name: Linux
pool:
vmImage: ubuntu-16.04
os: linux
artifact: vott*.snap

- template: azure-pipelines/templates/build-artifact.yml
parameters:
name: Windows
pool:
vmImage: "windows-2019"
os: windows
artifact: vott*.exe

- template: azure-pipelines/templates/build-artifact.yml
parameters:
name: MacOS
pool:
vmImage: macOS-10.15
os: mac
artifact: vott*.dmg

- stage: github_release
dependsOn: package_build
jobs:
- template: azure-pipelines/templates/create-github-release.yml
parameters:
GitHubConnection: 'GitHub connection' # defaults for any parameters that aren't specified
repositoryName: 'Microsoft/VoTT'
releaseNotesSource: input
addChangeLog: false
isPreRelease: true
isDraft: false
4 changes: 2 additions & 2 deletions release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- job: MacOS
condition: succeeded()
pool:
vmImage: macOS-10.13
vmImage: macOS-10.15
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
Expand All @@ -26,7 +26,7 @@ jobs:
- job: Windows
condition: succeeded()
pool:
vmImage: vs2017-win2016
vmImage: "windows-2019"
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
Expand Down
28 changes: 28 additions & 0 deletions scripts/version-bump-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -euo pipefail

NPM_RELEASE_TYPE=${1-"prepatch --preid=preview"}

# Get full branch name excluding refs/head from the env var SOURCE_BRANCH
SOURCE_BRANCH_NAME=${SOURCE_BRANCH/refs\/heads\/}

# Configure git to commit as SLS Azure Functions Service Account
echo "Configuring git to use deploy key..."
git config --local user.email "vott@microsoft.com"
git config --local user.name "Vott"

echo "SOURCE_BRANCH: ${SOURCE_BRANCH_NAME}"
git pull origin ${SOURCE_BRANCH_NAME}
git checkout ${SOURCE_BRANCH_NAME}
echo "Checked out branch: ${SOURCE_BRANCH_NAME}"

NPM_VERSION=`npm version ${NPM_RELEASE_TYPE} -m "release: Update ${NPM_RELEASE_TYPE} version to %s ***NO_CI***"`
echo "Set NPM version to: ${NPM_VERSION}"

SHA=`git rev-parse HEAD`

export GIT_SSH_COMMAND="ssh -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git remote add authOrigin git@github.com:microsoft/VoTT.git
git push authOrigin ${SOURCE_BRANCH_NAME} --tags

echo "Pushed new tag: ${NPM_VERSION} @ SHA: ${SHA:0:8}"
5 changes: 5 additions & 0 deletions server/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
APP_ID=xyz
APP_SECRET=asdf
COOKIE_SECRETS="[ { key: '12345678901234567890123456789012', iv: '123456789012' }, { key: 'abcdefghijklmnopqrstuvwxyzabcdef', iv: 'abcdefghijkl' }, ])"
ALLOW_HTTP=true
BASE_URL=http://localhost:3000/
35 changes: 35 additions & 0 deletions server/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug"
],
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/lib/app.js", //"${workspaceFolder}\\lib\\app.js",
"args": [
"|",
"bunyan"
],
"outFiles": [
"${workspaceFolder}/**/*.js"
],
"console": "internalConsole",
"outputCapture": "std",
}

]
}
24 changes: 24 additions & 0 deletions server/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"problemMatcher": [
"$tsc"
],
"group": "build"
},
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
],
"group": "build"
}
]
}
Loading

0 comments on commit 94daa11

Please sign in to comment.