Skip to content
Open

CD #63

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ea21be1
proper parametrization of hosts and ports
FmasterofU Feb 9, 2021
da07bdd
Update .gitignore
FmasterofU Feb 9, 2021
24bd195
Update .gitignore
FmasterofU Feb 9, 2021
b030052
adding npm packages for env var substitution
FmasterofU Feb 9, 2021
59c750a
Update package.json
FmasterofU Feb 9, 2021
1e2fde0
frontend dockerfiile
FmasterofU Feb 9, 2021
015c820
dockerfile backend
FmasterofU Feb 9, 2021
7dcb1ca
initial cd
FmasterofU Feb 9, 2021
74e30c0
Update prval.yml
FmasterofU Feb 9, 2021
871a936
docker backend host for frontend
FmasterofU Feb 9, 2021
6a3eb32
Merge branch 'cd-preparations' of https://github.com/One-E2-Team/ISA …
FmasterofU Feb 9, 2021
53dfcdc
Update cd.yml
FmasterofU Feb 9, 2021
d073d55
Update cd.yml
FmasterofU Feb 9, 2021
51bf22d
Update cd.yml
FmasterofU Feb 9, 2021
d7e1d3d
oook maintainer is requered
FmasterofU Feb 9, 2021
beaf50f
Merge branch 'cd-preparations' of https://github.com/One-E2-Team/ISA …
FmasterofU Feb 9, 2021
17a38b4
Update Dockerfile
FmasterofU Feb 9, 2021
f34d1df
forgot heroku login
FmasterofU Feb 9, 2021
b117175
Update cd.yml
FmasterofU Feb 9, 2021
6340736
Merge branch 'master' into cd-preparations
FmasterofU Feb 10, 2021
d401c1c
Merge branch 'master' into cd-preparations
FmasterofU Feb 10, 2021
882a415
removing schema to try direct war deployment
FmasterofU Feb 10, 2021
48cfa57
change to heroku deploy:war
FmasterofU Feb 11, 2021
b6145f1
heroku web runner
FmasterofU Feb 11, 2021
66b2613
Merge branch 'cd-preparations' of https://github.com/One-E2-Team/ISA …
FmasterofU Feb 11, 2021
2c66767
Revert "heroku web runner"
FmasterofU Feb 11, 2021
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
44 changes: 44 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
buildndeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Build Backend and push to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku container:login
cd isabackend
mvn --batch-mode --update-snapshots verify
heroku plugins:install heroku-cli-deploy
heroku war:deploy target/isabackend-0.0.1-SNAPSHOT.war --app isa-eu-backend
cd ..
- name: Build Frontend and push to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
ISA_BACKEND_HOST: isa-eu-backend.herokuapp.com
run: |
heroku container:login
cd isafrontend/frontend
npm install
npm run dockerbuild
docker build . -t registry.heroku.com/isa-frontend/web
docker push registry.heroku.com/isa-frontend/web
heroku container:release web --app isa-frontend
cd ../..
2 changes: 1 addition & 1 deletion .github/workflows/prval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
run: |
cd isafrontend/frontend
npm install
npm run lint
npm run build
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@
### npm/node ###
**/node_modules/
**/.cache/
**/dist/
**/dist/

# parametrization
**/configuration/communication.js
2 changes: 2 additions & 0 deletions isabackend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM tomcat:10.0.2-jdk15-openjdk-buster
ADD target/isabackend-0.0.1-SNAPSHOT.war /usr/local/tomcat/webapps/
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public ResponseEntity<User> addUser(@RequestBody UserRequestDTO userRequest, Uri
User user = this.userService.createPatient(userRequest);
HttpHeaders headers = new HttpHeaders();
headers.setLocation(ucBuilder.path("/api/user/{userId}").buildAndExpand(user.getId()).toUri());
this.emailNotificationService.sendNotificationAsync(user.getEmail(), "Account Validation", "Visit this link and validate your account: http://localhost:8083/api/auth/validate/" + user.getId() + "/");
this.emailNotificationService.sendNotificationAsync(user.getEmail(), "Account Validation", "Visit this link and validate your account: http://" + System.getenv("ISA_SPRING_HOST") + ":" + (System.getenv("PORT") != null ? System.getenv("PORT") : System.getenv("ISA_SPRING_PORT")) + "/api/auth/validate/" + user.getId() + "/");
return new ResponseEntity<>(user, HttpStatus.CREATED);
}

Expand Down
Loading