Skip to content

Commit 7af9016

Browse files
committed
config: Pre Steps to CD
1 parent 9380312 commit 7af9016

File tree

6 files changed

+43
-7
lines changed

6 files changed

+43
-7
lines changed

.github/workflows/CD-azure-functions.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [closed]
77
branches:
8-
- master
8+
- test
99

1010
jobs:
1111
build-and-deploy:
@@ -15,7 +15,6 @@ jobs:
1515
- uses: actions/setup-node@v1
1616
with:
1717
node-version: '10.x'
18-
# - name: 'run npm'
1918
run: |
2019
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
2120
npm i -g azure-functions-core-tools@core --unsafe-perm true

.github/workflows/CD.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CD process to deploy to AzureFuncions
2+
3+
on:
4+
# Trigger the workflow on pull request but only for the master branch
5+
push:
6+
branches:
7+
- test
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [10.x]
15+
steps:
16+
- name: Azure Login
17+
uses: azure/login@v1
18+
with:
19+
creds: ${{ secrets.AZURE_CREDENTIALS }}
20+
21+
- name: Checkout Repository
22+
uses: actions/checkout@master
23+
24+
- uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ local.settings.json
2525

2626
node_modules
2727

28-
AutomaticClockOuts/node_modules
28+
2929
.idea/
3030
.vscode/
31-
serverless.yml
31+
serverless.yml
32+
.serverless

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
help: Makefile
2+
@sed -n 's/^## //p' $<
3+
4+
## npm-install-functions -> Added dependencies in case that the functions need, add manually the command and Makefile
5+
deploy-nodejs-functions:
6+
cd nodejs-functions ; pwd ; $(MAKE) functions-with-dependencies
7+
-8.13 MB
Binary file not shown.

nodejs-functions/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
help: Makefile
22
@sed -n 's/^## //p' $<
33

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

0 commit comments

Comments
 (0)