Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'remotes/origin/master' into development
  • Loading branch information
Evan Langlais committed Feb 7, 2019
2 parents 4d56a0d + faa4749 commit d2fed3c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .htaccess
@@ -0,0 +1,7 @@
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
53 changes: 53 additions & 0 deletions Jenkinsfile
@@ -0,0 +1,53 @@
#!groovy

properties(
[
[$class: 'BuildDiscarderProperty', strategy:
[$class: 'LogRotator', artifactDaysToKeepStr: '14', artifactNumToKeepStr: '5', daysToKeepStr: '30', numToKeepStr: '60']],
pipelineTriggers(
[
pollSCM('H/1 * * * *'),
// cron('@daily'),
]
)
]
)
node {
stage('Checkout') {
//disable to recycle workspace data to save time/bandwidth
deleteDir()
checkout scm

//enable for commit id in build number
//env.git_commit_id = sh returnStdout: true, script: 'git rev-parse HEAD'
//env.git_commit_id_short = env.git_commit_id.take(7)
//currentBuild.displayName = "#${currentBuild.number}-${env.git_commit_id_short}"
}

stage('NPM Install') {
withEnv(["NPM_CONFIG_LOGLEVEL=warn"]) {
sh 'npm install'
}
}

stage('Lint') {
sh 'ng lint'
}

stage('Build') {
milestone()
sh 'ng build --prod --aot --progress=false'
}

stage('Archive') {
sh 'tar -cvzf dist.tar.gz --strip-components=1 dist'
archive 'dist.tar.gz'
}

stage('Deploy') {
milestone()
echo "Deploying..."
sh 'rm -r /var/www/html/*'
sh 'cp -r dist/. /var/www/html/'
}
}
29 changes: 10 additions & 19 deletions README.md
@@ -1,27 +1,18 @@
# Frontend
# PowerPanel Frontend

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.4.

## Development server
## Installation
1. Ensure you have npm installed
2. Clone repository into new folder
3. In terminal / CMD run npm install

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build
## Development

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
When developing, ensure you are on a different branch (NOT working on master).

## Running unit tests
Once you have a local instance that seems ready to merge into master, create a pull request.

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Local development server

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
4 changes: 2 additions & 2 deletions angular.json
Expand Up @@ -13,7 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/frontend",
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down Expand Up @@ -130,4 +130,4 @@
}
},
"defaultProject": "frontend"
}
}

0 comments on commit d2fed3c

Please sign in to comment.