Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Add CI configuration for build and relevant package scripts #67

Merged
merged 5 commits into from
Oct 25, 2023
Merged
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
6 changes: 4 additions & 2 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"test": "environments/environment.test.ts"
"test": "environments/environment.test.ts",
"ci": "environments/environment.ci.ts",
"local": "environments/environment.local.ts"
}
}],
"e2e": {
Expand All @@ -66,4 +68,4 @@
"styleExt": "css",
"component": {}
}
}
}
28 changes: 14 additions & 14 deletions .github/workflows/package-prod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Static Code Analysis and Package Prod
on:
push:
branches: [ "master"]

jobs:
Package:
runs-on: ubuntu-latest
Expand All @@ -14,24 +14,24 @@ jobs:
strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v3


- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Build with NPM


- name: Build with NPM
run: |
npm config set legacy-peer-deps true
npm install -g @angular/cli
Expand All @@ -40,14 +40,14 @@ jobs:
npm install [email protected]
npm install node-sass --force
npm install --force
- name: Create WAR file


- name: Create WAR file
run: npm run ng build --prod --aot && grunt

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
name: HWC-UI
path: target/tmui-v1.0.war
path: target/hwc-app-facility.war

22 changes: 11 additions & 11 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Package
on:
push:
branches: [ "develop" ]

jobs:
CodeQL:
runs-on: ubuntu-latest
Expand All @@ -14,23 +14,23 @@ jobs:
strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v3


- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'


- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Build with NPM and Maven
run: |
npm config set legacy-peer-deps true
Expand All @@ -41,12 +41,12 @@ jobs:
npm install --force
npm run build
mvn clean install
- name: Create WAR file
- name: Create WAR file
run: mvn -B package --file pom.xml

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
name: HWC-UI
path: target/tmui-v1.0.war
path: target/hwc-app-facility.war
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db
src/environments/environment.local.ts
src/environments/environment.ci.ts
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v8.9.0
48 changes: 0 additions & 48 deletions Gruntfile.js

This file was deleted.

42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This microservice is built on Java, Spring boot framework and MySQL DB.
* HWC-API module should be running
* JDK 1.8
* Maven
* Nodejs
* Nodejs v8.9.0


## Installation
Expand All @@ -53,20 +53,20 @@ https://github.com/coreybutler/nvm-windows/releases
Steps to download nvm and node: https://dev.to/skaytech/how-to-install-node-version-manager-nvm-for-windows-10-4nbi

Install Node.js using below command:
nvm install 8.9.0
`nvm install 8.9.0`

Check Node.js version:
node --version
`node --version`

Check npm version:
npm --version
`npm --version`

Using the below command to specify the version of npm that you wish to use. In our case, since we have only one version installed. Let's go with that.
nvm use 8.9.0
`nvm use 8.9.0`

* Angular CLI Installation
Angular CLI is a command line tool for Angular. You can install it globally using npm with the following command:
npm install -g @angular/cli@1.7.0
`npm install -g @angular/[email protected]`

* Python Installation [ If you face any Python related error during node_modules installation]
Download Python 2.7.12
Expand Down Expand Up @@ -101,30 +101,38 @@ C:\Users\ myFolder\AppData\Roaming\npm

Note: After changing environment variables, please restart your system and check again.


* Steps to clone and setup HWC-Facility-APP:
1. Clone HWC-Facility-App from git hub fork branch in your local system using below command:
git clone <repository-Url>
1. Clone HWC-Facility-App from GitHub fork branch in your local system using below command:
`git clone <repository-url>`

2. Open hwc-facility-app project code in Visual Studio Code

3. Navigate to your project folder and execute below command for node_modules installation:
npm install
`npm install`

4. If you face any error related to ng2-smart-table, execute below command:
4. If you face any error related to ng2-smart-table, execute below command:
`npm install [email protected]`

npm install [email protected]
5. Copy environment configuration. `cp src/environments/environment.ts src/environments/environment.local.ts`. Edit the endpoints, ports and IPs as per your local running services.

5. Once node module is installed successfully, then run the project using below command:
6. Once node module is installed successfully, then run the project using below command:
ng serve

By default your application will be available at ‘http://localhost:4200/’. You can access it in your browser.


### Prerequisites
* Wildfly (or any compatible app server)
* Redis
* MySQL Database
### Building war files

1. To build deployable war files
```bash
mvn -B package --file pom.xml -P <profile_name>
```

The available profiles include dev, local, test, and ci.
Refer to `src/environments/environment.ci.template` file and ensure that the right environment varaibles are set for the build.

Packing with `ci` profile calls `build-ci` script in `package.json`.
It creates a `environment.ci.ts` file with all environment variables used in the generared build.

## Integrations
* Video Consultation
Expand Down
66 changes: 0 additions & 66 deletions main.js

This file was deleted.

Loading