Skip to content

Whitesource actions #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
14d4e24
ADP-40 Reverse Proxy API Calls
pmooneyarchitech Jul 30, 2021
2e62e52
Add or update the App Service deployment workflow configuration from …
vvalusa Aug 13, 2021
13e9117
Update master_ADP-Frontend-dev.yml
vvalusa Aug 15, 2021
9026862
Update master_ADP-Frontend-dev.yml
vvalusa Aug 15, 2021
6828b61
Merge pull request #1 from Architech-Organization/feature/ADP-40_prox…
vvalusa Aug 16, 2021
2e9702f
Update master_ADP-Frontend-dev.yml
vvalusa Aug 16, 2021
bb46701
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
e799c67
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
a31fdfd
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
b261463
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
8d1b3f0
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
4b951b8
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
97b4a8c
Update master_ADP-Frontend-dev.yml
vvalusa Aug 17, 2021
1abe208
Update master_ADP-Frontend-dev.yml
vvalusa Aug 19, 2021
8e5a6e2
Add or update the App Service deployment workflow configuration from …
vvalusa Aug 30, 2021
cdd9d4b
Remove the App Service deployment workflow configuration from Azure P…
invalid-email-address Aug 30, 2021
4e49b64
Add or update the App Service deployment workflow configuration from …
vvalusa Aug 30, 2021
4868a2c
Update master_ADP-Frontend-dev.yml
vvalusa Aug 30, 2021
a3e6ed1
Delete master_frontend-app-service-fgarst7565das232132.yml
vvalusa Aug 30, 2021
226a3e2
Add or update the App Service deployment workflow configuration from …
vvalusa Aug 30, 2021
68ef3c9
Update master_ADPfrontend.yml
vvalusa Aug 30, 2021
8d67773
Update master_ADPfrontend.yml
vvalusa Aug 30, 2021
70c568a
Update master_ADPfrontend.yml
vvalusa Aug 30, 2021
9ab9c7b
Update master_ADPfrontend.yml
vvalusa Aug 30, 2021
c48c8cc
Update CNAME
vvalusa Sep 1, 2021
aaf0814
Updtaed workflow
vvalusa Sep 8, 2021
3377df6
added app-name
vvalusa Sep 8, 2021
839e68e
update workflow
vvalusa Sep 8, 2021
a2ab54d
update workflow
vvalusa Sep 8, 2021
dc44892
Add or update the App Service deployment workflow configuration from …
vvalusa Sep 9, 2021
a3a3f01
Update master_sample-frontend-angular-web-app.yml
vvalusa Sep 9, 2021
ce44ba4
Update master_sample-frontend-angular-web-app.yml
vvalusa Sep 9, 2021
3481649
Delete master_sample-frontend-angular-web-app.yml
vvalusa Sep 9, 2021
ff86ac7
Add or update the App Service deployment workflow configuration from …
vvalusa Sep 9, 2021
98c9b32
Delete master_sample-frontend-angular-web-app.yml
vvalusa Sep 9, 2021
694c406
add publish profile
vvalusa Sep 9, 2021
c79e710
update publish profile
vvalusa Sep 9, 2021
8ee1fd6
Add or update the App Service deployment workflow configuration from …
vvalusa Sep 9, 2021
5ae9363
update workflow file
vvalusa Sep 9, 2021
ee87a73
Added Dockerfile and docker-compose.yaml
pmooneyarchitech Oct 1, 2021
a433527
Single stage dockerfile.
pmooneyarchitech Oct 4, 2021
e947e16
Merge pull request #2 from Architech-Organization/feature/Dockerfile
vvalusa Oct 16, 2021
1e2ece8
made changes
vvalusa Nov 28, 2021
945bd4b
Update changes
vvalusa Nov 29, 2021
88d06c7
Add .whitesource configuration file
mend-for-github-com[bot] Apr 14, 2022
53b24a5
Merge pull request #3 from Architech-Organization/whitesource/configure
babiraman Apr 14, 2022
f281617
test run
rrachitha Apr 18, 2022
dd7c5a3
test run - 2
rrachitha Apr 18, 2022
4338833
test run - 3
rrachitha Apr 18, 2022
2f90f72
Create test.txt
rrachitha Apr 19, 2022
80ee352
Merge pull request #9 from Architech-Organization/rach-test
rrachitha Apr 19, 2022
28779d2
Update deploy-frontend.yml
rrachitha Apr 21, 2022
32a0534
Update deploy-frontend.yml
rrachitha Apr 22, 2022
2314e09
Update deploy-frontend.yml
rrachitha Apr 22, 2022
5e06678
whitesource github actions yaml file
Apr 26, 2022
91c605e
whitesource github actions yaml file
Apr 26, 2022
1ad8088
whitesource github actions yaml file
Apr 26, 2022
b60ea56
added a space
Apr 26, 2022
e7af706
Uploading Whitesource results
Apr 27, 2022
d1ed690
Update deploy-frontend-whitesource.yml
babiraman May 26, 2022
4b5989b
Update package.json
babiraman Jun 21, 2022
739d5c5
Update package.json
babiraman Jun 21, 2022
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
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Hidden files and folders
.*
.*/

# Test folder
e2e/

# Dependencies and build folders
node_modules/

# Non-build related files
README.md
logo.png
karm.conf.js
protractor.conf.js
proxy.conf.js

67 changes: 67 additions & 0 deletions .github/workflows/deploy-frontend-whitesource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

on:
push:
branches:
- '*'
workflow_dispatch:

jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
#npm run test --if-present

- name: WhiteSource Unified Agent Scan
env:
WS_APIKEY: ${{secrets.APIKEY}}
WS_USERKEY: ${{secrets.USERKEY}}
WS_WSS_URL: https://app.whitesourcesoftware.com/agent
WS_PRODUCTNAME: ${{github.event.repository.name}}
WS_PROJECTNAME: ${{github.ref}}
WS_FILESYSTEMSCAN: false
WS_GENERATEPROJECTDETAILSJSON: true
WS_UPDATEINVENTORY: true #(defaults to true)
WS_enableImpactAnalysis: true
WS_resolveAllDependencies: false
run: |
sudo apt-get install jq curl
echo Downloading WhiteSource Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting WhiteSource Scan
java -jar wss-unified-agent.jar
fi
- name: Archive Whitesource results
uses: actions/upload-artifact@v3
with:
name: Whitesource reports
path: ./whitesource


# - name: 'Deploy to Azure Web App'
# id: deploy-to-webapp
# uses: azure/webapps-deploy@v2
# with:
# app-name: angular-essentials-demo
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# package: dist/
37 changes: 37 additions & 0 deletions .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

on:
push:
branches:
- '*'
workflow_dispatch:

jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
#npm run test --if-present

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: angular-essentials-demo
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: dist/
21 changes: 21 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken": "",
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
},
"remediateSettings": {
"workflowRules": {
"enabled": true
}
}
}
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
angular.realworld.io
sample-frontend-angular-web-app
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:14.18-slim

RUN mkdir /server
WORKDIR /server

RUN npm install http-server -g

COPY ./dist .

EXPOSE 8080

CMD ["http-server"]
14 changes: 14 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
frontend:
build:
context: .
proxy:
image: nginx:1.17.4
volumes:
- ./nginx/default.conf:/tmp/default.conf.template
command: ["/bin/bash", "-c", "envsubst < /tmp/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"]
environment:
APP_SERVER: 'http://frontend:8080'
API_SERVER: '${API_SERVER:-http://host.docker.internal:8080}'
ports:
- "80:80"
2 changes: 1 addition & 1 deletion e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ describe('ng-demo App', () => {
page.navigateTo();
expect(page.getParagraphText()).toContain('conduit');
});
});
});
13 changes: 13 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
server {
listen 80;
server_name localhost;

location / {
proxy_pass ${APP_SERVER};
}

location /api {
rewrite /api/(.*) /$1 break;
proxy_pass ${API_SERVER};
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "ng serve --proxy-config proxy.conf.js",
"build": "ng build --configuration production --base-href ./ && cp CNAME dist/CNAME",
"test": "ng test",
"lint": "ng lint --force",
Expand Down Expand Up @@ -58,4 +58,4 @@
"tslint": "~6.1.3",
"typescript": "4.3.5"
}
}
}
12 changes: 12 additions & 0 deletions proxy.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var PROXY_CONF = {
"/api": {
"target": process.env.API_URL || "http://localhost:8080",
"secure": true,
"pathRewrite": {
"^/api": ""
},
"changeOrigin": true
}
}

module.exports = PROXY_CONF
3 changes: 2 additions & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
production: true,
api_url: 'https://conduit.productionready.io/api'
// api_url: 'https://conduit.productionready.io/api'
api_url: '/api'
};
3 changes: 2 additions & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

export const environment = {
production: false,
api_url: 'https://conduit.productionready.io/api'
// api_url: 'https://conduit.productionready.io/api'
api_url: '/api'
};
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if (environment.production) {
enableProdMode();
}


const bootstrapPromise = platformBrowserDynamic().bootstrapModule(AppModule);

// Logging bootstrap information
Expand Down
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file to trigger whitesource
15 changes: 15 additions & 0 deletions workspace.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"folders": [
{
"path": ".."
},
{
"path": "../../../Clients/ADP/terraform-azurerm-postgresql-flexible-server"
}
],
"extensions": {
"recommendations": [
"whitesource.whitesource-advise"
]
}
}