-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup CI/CD for API and Client app with Azure pipelines (#51)
- Added YAML pipeline config for client app - Pipeline config for API is done in Azure DevOps - Added environment variables needed for deployment
- Loading branch information
1 parent
b284e43
commit 7d03e99
Showing
13 changed files
with
88 additions
and
14 deletions.
There are no files selected for viewing
File renamed without changes.
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,64 @@ | ||
# This script will run the linter, run tests and create a production build. | ||
# It then zips the build folder deploys it to Netlify | ||
|
||
variables: | ||
clientFolder: client | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- 'master' | ||
|
||
# Disable for PRs | ||
pr: | ||
branches: | ||
exclude: | ||
- '*' | ||
|
||
jobs: | ||
- job: client_testing | ||
displayName: Client App Production Build | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '10.x' | ||
displayName: 'Install Node.js' | ||
|
||
- script: | | ||
yarn install | ||
yarn add -D jest-junit | ||
workingDirectory: $(clientFolder) | ||
displayName: 'Install dependencies' | ||
- script : | | ||
yarn lint | ||
yarn lint:style | ||
workingDirectory: $(clientFolder) | ||
displayName: 'Lint code' | ||
- script: CI=true yarn test --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura | ||
workingDirectory: $(clientFolder) | ||
displayName: 'Run tests' | ||
|
||
- script: yarn build | ||
workingDirectory: $(clientFolder) | ||
displayName: 'Build project' | ||
|
||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: '$(clientFolder)/build' | ||
archiveType: 'zip' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' | ||
replaceExistingArchive: true | ||
displayName: 'Archive files' | ||
|
||
- script: >- | ||
curl | ||
-H 'Authorization: Bearer $(netlifyAccessToken)' | ||
-H 'Content-Type: application/zip' | ||
--data-binary '@$(Build.BuildId).zip' | ||
https://api.netlify.com/api/v1/sites/$(netlifySiteId)/deploys | ||
workingDirectory: '$(Build.ArtifactStagingDirectory)' | ||
displayName: 'Upload to Netlify' |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
SASS_PATH=src | ||
REACT_APP_API_URL=http://localhost:5000 |
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,2 @@ | ||
SASS_PATH=src | ||
REACT_APP_API_URL=https://poule-poule-api.azurewebsites.net |
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 |
---|---|---|
|
@@ -23,4 +23,7 @@ yarn-debug.log* | |
yarn-error.log* | ||
|
||
# VSCode | ||
.vscode/ | ||
.vscode/ | ||
|
||
# Local Netlify folder | ||
.netlify |
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 @@ | ||
/* /index.html 200 |
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
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
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
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
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
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