Skip to content
Merged

CD #46

Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
config: Pre Steps to CD
  • Loading branch information
diegotony committed Mar 25, 2021
commit 7af9016e70c958f530d9f3f00db5983ff0e37752
3 changes: 1 addition & 2 deletions .github/workflows/CD-azure-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
types: [closed]
branches:
- master
- test

jobs:
build-and-deploy:
Expand All @@ -15,7 +15,6 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
# - name: 'run npm'
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
npm i -g azure-functions-core-tools@core --unsafe-perm true
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CD process to deploy to AzureFuncions

on:
# Trigger the workflow on pull request but only for the master branch
push:
branches:
- test

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Checkout Repository
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}


5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ local.settings.json

node_modules

AutomaticClockOuts/node_modules

.idea/
.vscode/
serverless.yml
serverless.yml
.serverless
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
help: Makefile
@sed -n 's/^## //p' $<

## npm-install-functions -> Added dependencies in case that the functions need, add manually the command and Makefile
deploy-nodejs-functions:
cd nodejs-functions ; pwd ; $(MAKE) functions-with-dependencies

Binary file removed nodejs-functions/.serverless/nodejs-functions.zip
Binary file not shown.
7 changes: 4 additions & 3 deletions nodejs-functions/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
help: Makefile
@sed -n 's/^## //p' $<

## run -> run serverless function
run:
sls offline
## npm-install-functions -> Added dependencies in case that the functions need, add manually the command and Makefile
functions-with-dependencies:
cd src/handlers/automatic-clock-outs ; pwd ; $(MAKE) install