Skip to content

Commit

Permalink
Merge pull request #12 from ossimlabs/dev
Browse files Browse the repository at this point in the history
Merging dev into master
  • Loading branch information
Kevin Naquin authored Oct 21, 2019
2 parents dce0a44 + b50d333 commit 428a509
Show file tree
Hide file tree
Showing 133 changed files with 17,907 additions and 24,180 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.gradle
.idea
build
client/yarn.lock
.idea
server/build
client/dist
client-backup
79 changes: 79 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
properties([
buildDiscarder( logRotator( numToKeepStr: '5' ) ),
disableConcurrentBuilds(),
parameters([
string( name: 'BUILD_NODE', defaultValue: 'omar-build', description: 'The build node to run on' ),
booleanParam(name: 'CLEAN_WORKSPACE', defaultValue: true, description: 'Clean the workspace at the end of the run' )
]),
pipelineTriggers([
[ $class: "GitHubPushTrigger" ]
]),
[
$class: 'GithubProjectProperty',
displayName: '',
projectUrlStr: 'https://github.com/ossimlabs/omar-ui-proto'
]
])

node( "${ BUILD_NODE }" ) {

stage("Checkout branch $BRANCH_NAME" ) {
checkout( scm )
}

stage( "Load Variables" ) {
withCredentials([
string( credentialsId: 'o2-artifact-project', variable: 'o2ArtifactProject' )
]) {
step ([
$class: "CopyArtifact",
filter: "common-variables.groovy",
flatten: true,
projectName: o2ArtifactProject
])
}

load "common-variables.groovy"
}

stage ( "Assemble" ) {
sh """
echo "registry = ${NPM_REGISTRY}" >> .npmrc
export CHROMEDRIVER_SKIP_DOWNLOAD=true
./gradlew assembleServerAndClient -PossimMavenProxy=${ OSSIM_MAVEN_PROXY }
"""
}

stage ( "Publish Docker App" ) {
withCredentials([[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'dockerCredentials',
passwordVariable: 'DOCKER_REGISTRY_PASSWORD',
usernameVariable: 'DOCKER_REGISTRY_USERNAME'
]]) {
// Run all tasks on the app. This includes pushing to OpenShift and S3.
sh "./gradlew pushDockerImage -PossimMavenProxy=${ OSSIM_MAVEN_PROXY }"
}
}
try {
stage ( "OpenShift Tag Image" ) {
withCredentials([[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'openshiftCredentials',
usernameVariable: 'OPENSHIFT_USERNAME',
passwordVariable: 'OPENSHIFT_PASSWORD'
]]) {
// Run all tasks on the app. This includes pushing to OpenShift and S3.
sh "./gradlew openshiftTagImage -PossimMavenProxy=${ OSSIM_MAVEN_PROXY }"
}
}

stage( "Clean Workspace" ) {
if ( "${ CLEAN_WORKSPACE }" == "true" ) {
step([ $class: 'WsCleanup' ])
}
}
} catch (e) {
echo e.toString()
}
}
27 changes: 27 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
task copyClientResources( type: Copy, dependsOn: ':client:build' ) {
group = 'build'
description = 'Copy client resources into server'
def srcDir = "${ project( ':client' ).projectDir }/dist"
def destDir = "${ project( ':server' ).buildDir }/resources/main/public"

println "Copying files from ${ srcDir } to ${ destDir }"
// println new File( destDir ).mkdirs()

from srcDir
into destDir
}

task assembleServerAndClient( dependsOn: [ 'copyClientResources', ':server:shadowJar' ] ) {
group = 'build'
description = 'Build combined server & client JAR'
}

task test {

}

task check {

}

tasks.getByPath( ':server:shadowJar' ).mustRunAfter( copyClientResources )
18 changes: 0 additions & 18 deletions client/.babelrc

This file was deleted.

4 changes: 4 additions & 0 deletions client/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
> 1%
last 2 versions

not ie <= 10
9 changes: 0 additions & 9 deletions client/.editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions client/.eslintignore

This file was deleted.

27 changes: 10 additions & 17 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
// https://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
node: true
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
"quotes": [2, "single", { "avoidEscape": true }]
},
parserOptions: {
parser: 'babel-eslint'
}
}
14 changes: 9 additions & 5 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
.DS_Store
node_modules/
/dist/
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
selenium-debug.log

# Editor directories and files
.idea
Expand All @@ -15,3 +18,4 @@ selenium-debug.log
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 0 additions & 10 deletions client/.postcssrc.js

This file was deleted.

43 changes: 21 additions & 22 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# client

> A Vue.js project
## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:3000
npm run dev

# build for production with minification
npm run build
## Project setup
```
yarn install
```

# build for production and view the bundle analyzer report
npm run build --report
### Compiles and hot-reloads for development
```
yarn run serve
```

# run unit tests
npm run unit
### Compiles and minifies for production
```
yarn run build
```

# run e2e tests
npm run e2e
### Run your tests
```
yarn run test
```

# run all tests
npm test
### Lints and fixes files
```
yarn run lint
```

For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
10 changes: 10 additions & 0 deletions client/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
'presets': [
[
'@vue/app',
{
'useBuiltIns': 'entry'
}
]
]
}
56 changes: 20 additions & 36 deletions client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,33 @@
plugins {
id "com.moowork.node" version "1.2.0"
id "com.github.node-gradle.node" version "1.3.0"
}

node {
version = '8.7.0'
yarnVersion = '1.3.2'
download = true
version = '10.15.0' // https://nodejs.org/en/
yarnVersion = '1.13.0' // https://yarnpkg.com/en/
download = true
}

task bootRun(dependsOn: 'start') {
group = 'application'
description = 'Run the client app (for use with gradle bootRun -parallel'
task run( type: YarnTask, dependsOn: 'yarn' ) {
group = 'application'
description = 'Run the client app'
args = [ 'run', 'serve' ]
}

task start(type: YarnTask, dependsOn: 'yarn') {
group = 'application'
description = 'Run the client app'
args = ['run', 'start']
task build( type: YarnTask, dependsOn: 'yarn' ) {
group = 'build'
description = 'Build the client bundle'
args = [ 'run', 'build' ]
}

task build(type: YarnTask, dependsOn: 'yarn') {
group = 'build'
description = 'Build the client bundle'
args = ['run', 'build']
}
task lint(type: YarnTask, dependsOn: 'yarn') {
group = 'build'
description = 'Run eslint'
args = ['run', 'lint']
}

task test(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Run the unit & e2e tests'
args = ['run', 'test']
}

task unit(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Run the unit tests'
args = ['run', 'unit']
task test( type: YarnTask, dependsOn: 'yarn' ) {
group = 'verification'
description = 'Run the client tests'
args = [ 'run', 'test' ]
}

task e2e(type: YarnTask, dependsOn: 'yarn') {
group = 'verification'
description = 'Run the e2e tests'
args = ['run', 'e2e']
task eject( type: YarnTask, dependsOn: 'yarn' ) {
group = 'other'
description = 'Eject from the create-react-app scripts'
args = [ 'run', 'eject' ]
}
8 changes: 0 additions & 8 deletions client/config/dev.env.js

This file was deleted.

Loading

0 comments on commit 428a509

Please sign in to comment.