Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Set up CI with Azure Pipelines #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pool:
vmImage: 'ubuntu-16.04'
trigger:
- master
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)/Templates'
inputs:
SourceFolder: deployment
Contents: '*.json'
TargetFolder: '$(build.artifactstagingdirectory)/Templates'
- task: Npm@1
displayName: 'npm custom'
inputs:
command: custom
verbose: false
customCommand: 'install --production'
- task: ArchiveFiles@2
displayName: 'Archive $(Build.SourcesDirectory)'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
26 changes: 3 additions & 23 deletions README.md → rdme.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
###[![Build Status](https://dev.azure.com/iugamircea0062/new%20test/_apis/build/status/mirceaiuga.ContosoAir?branchName=master)](https://dev.azure.com/iugamircea0062/new%20test/_build/latest?definitionId=2&branchName=master)

ddddsdddddsdsddddddddddd


# Microsoft.Github CI Demo

Demo website application for Contoso Air.
Runs a nodejs server (Express v4.16) that stores customer booked flights in a CosmosDb database.

## Requirements

* Node v8.9.4 or later
* Azure CosmosDb

## Local Environment Setup

This project uses ES6, and has been tested with nodejs v8.9.4
There is almost no front-end logic. Still, the application uses webpack to compile sass styles and bundle third parties js files. If you want to modify any front logic or style run `npm run local:build`.

In order to launch a local server on port 3000 (can be modified with environment variable PORT) run:
server on port 3000 (can be modified with environment variable PORT) run:

```bash
npm install
SET %COSMOS_DB_NAME%=<azure_web_site>
SET %COSMOS_DB_AUTH_KEY%=<cosmos_auth_key>
npm start
```

This will run locally the server and attach to the CosmosDb Endpoint using mongodb connection string.

## Azure Manual Deployment

In order to create the Azure deploy there is an ARM template located at deployment folder.

ARM template parameter | Usage | e.g.
--- | --- | ---
p_environment | set an environment suffix | `dev`
Expand Down