-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91f836b
commit 2234886
Showing
62 changed files
with
3,320 additions
and
4,312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# http://editorconfig.org | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
target/* | ||
.idea/* | ||
*.iml | ||
nbactions.xml | ||
/.idea | ||
/.vs | ||
**/nbactions.xml | ||
**/*.iml | ||
**/*.lnk | ||
**/target | ||
/build.properties | ||
/node_modules | ||
/node | ||
/nb-configuration.xml | ||
/.classpath | ||
/.project | ||
/.settings/ | ||
/.vscode/settings.json | ||
/.externalToolBuilders/ | ||
/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
#!/usr/bin/env groovy | ||
def releaseParams = [:]; | ||
def buildParams = [:]; | ||
|
||
def testStageWasExecute = false; | ||
|
||
def updateVersions(targetversion,pushChanges=false){ | ||
echo "update versions in manifest.json files to ${targetversion}" | ||
sh "mvn validate -P write-release-versions -Dreplace.target.version=${targetversion}" | ||
echo "update versions in pom.xml files to ${targetversion}" | ||
sh "mvn versions:set -DnewVersion=${targetversion} -DgenerateBackupPoms=false" | ||
sh "mvn scm:checkin -DpushChanges=${pushChanges} -Dmessage=\"[update-version] to ${targetversion}\"" | ||
} | ||
|
||
pipeline { | ||
agent { | ||
label 'maven-java-8' | ||
} | ||
environment { | ||
GIT_NEXUS_ID = 'bitbucket-nexus-access' | ||
GITHUB_CREDENTIAL_ID = 'github-api-key' | ||
AKS_CRED_ID = 'aksCTPrdSrv' | ||
} | ||
options { | ||
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '0', daysToKeepStr: '', numToKeepStr: '10')) | ||
disableConcurrentBuilds() | ||
timeout(time: 60, unit: 'MINUTES') | ||
} | ||
parameters { | ||
string(name: 'cause', defaultValue: 'manual', description: 'Who triggered this build?') | ||
booleanParam(name: 'release', defaultValue: false, description: 'Should a release be performed?') | ||
booleanParam(name: 'test', defaultValue: true, description: 'Should tests be performed?') | ||
booleanParam(name: 'build', defaultValue: true, description: 'Should a full build/compress be performed?') | ||
} | ||
stages { | ||
stage('Initialize'){ | ||
steps { | ||
echo "Pipeline triggered because ${params.cause}" | ||
|
||
echo "Cleanup workspace" | ||
sh 'mvn clean -P release,compress,rollout' | ||
|
||
script{ | ||
buildParams << params; | ||
if (!buildParams.release){ | ||
return; | ||
} | ||
def project = readMavenPom(); | ||
def curversion = project.version.replace('-SNAPSHOT', '') | ||
timeout(5) { | ||
releaseParams = input message: "Choose Versions:", parameters: [ | ||
string(defaultValue: "${curversion}", description: 'The current release version', name: 'RELEASE_VERSION'), | ||
string(defaultValue: "${curversion}", description: 'The next target version', name: 'NEXT_DEV_VERSION_RAW')] | ||
} | ||
if (releaseParams['RELEASE_VERSION'] == releaseParams['NEXT_DEV_VERSION_RAW']){ | ||
error "Release and new target version must be different!" | ||
} | ||
def rawDevVersion = releaseParams['NEXT_DEV_VERSION_RAW'] | ||
rawDevVersion = rawDevVersion.replace('-SNAPSHOT', ''); | ||
// Ensure that raw dev version has no snapshot post fix | ||
releaseParams['NEXT_DEV_VERSION_RAW'] = rawDevVersion; | ||
// ensure that next dev version has a snapshot post fix | ||
releaseParams['NEXT_DEV_VERSION'] = rawDevVersion + "-SNAPSHOT"; | ||
// update display name | ||
currentBuild.displayName = "${currentBuild.displayName} RELEASE ${releaseParams['RELEASE_VERSION']}" | ||
|
||
echo "Update module versions ${releaseParams}" | ||
withCredentials([usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){ | ||
updateVersions(releaseParams['RELEASE_VERSION'],false); | ||
} | ||
} | ||
} | ||
} | ||
stage('Test'){ | ||
when { expression { return buildParams.test && !buildParams.release} } | ||
steps { | ||
echo "run java tests" | ||
// need to run install to have submodules ready for webapp jetty start | ||
sh "mvn install" | ||
echo "run js tests" | ||
sh "mvn prepare-package -P run-js-tests,include-mapapps-deps" | ||
|
||
script { | ||
testStageWasExecute = true; | ||
} | ||
} | ||
} | ||
stage('Build') { | ||
when { expression { return buildParams.build || buildParams.release } } | ||
steps { | ||
echo "full build + js compress + nexus deploy" | ||
withCredentials([usernamePassword(credentialsId: GIT_NEXUS_ID, passwordVariable: 'USER_PW', usernameVariable: 'USER_NAME')]) { | ||
sh 'mvn deploy -P compress -DdeployAtEnd=true -Dmaven.test.skip.exec=true -Dct-nexus.username=$USER_NAME -Dct-nexus.password=$USER_PW' | ||
} | ||
} | ||
} | ||
stage('Rollout') { | ||
when { expression { return buildParams.release } } | ||
steps { | ||
echo "create rollout" | ||
withCredentials([usernamePassword(credentialsId: GIT_NEXUS_ID, passwordVariable: 'USER_PW', usernameVariable: 'USER_NAME'), | ||
usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){ | ||
sh "mvn deploy -P github-release -Dct-nexus.username=${USER_NAME} -Dct-nexus.password=${USER_PW} -Dusername=${GITHUB_USER_NAME} -Dpassword=${GITHUB_USER_PW}" | ||
} | ||
} | ||
} | ||
stage('Finalize') { | ||
steps { | ||
script { | ||
if (!buildParams.release){ | ||
return; | ||
} | ||
echo "Update versions after release" | ||
withCredentials([usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){ | ||
updateVersions(releaseParams['NEXT_DEV_VERSION'],true); | ||
} | ||
} | ||
} | ||
post { | ||
success{ | ||
echo "Cleanup workspace after build" | ||
sh 'mvn clean -P release,compress,rollout' | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,141 +1,33 @@ | ||
# mapapps-intro | ||
|
||
This bundle allows you to create your own step-by-step guide in map.apps based on the hopscotch framework. | ||
https://github.com/linkedin/hopscotch | ||
|
||
:heavy_exclamation_mark: desktop-only | ||
|
||
![Screenshot App](https://github.com/conterra/mapapps-intro/blob/master/screenshot.JPG) | ||
|
||
Sample App | ||
------------------ | ||
https://demos.conterra.de/mapapps/resources/apps/downloads_intro/index.html | ||
https://demos.conterra.de/mapapps/resources/apps/downloads_intro_4x/index.html | ||
## Sample App | ||
|
||
Installation Guide | ||
------------------ | ||
https://demos.conterra.de/mapapps/resources/apps/downloads_intro_4x/index.html | ||
|
||
1. First, you need to add the bundle "dn_intro" to your app. | ||
2. After that, change the intro properties in the app.json: | ||
## Installation Guide | ||
|
||
``` | ||
"dn_intro": { | ||
"UserIntro": { | ||
// Enable / Disable intro-start on startup | ||
"startIntroOnStartup": true, | ||
// Default bubble width. Default: 280. | ||
"bubbleWidth": 280, | ||
// Default bubble padding. Default: 15. | ||
"bubblePadding": 15, | ||
// Should the page scroll smoothly to the next step? Default: true. | ||
"smoothScroll": true, | ||
// Duration of page scroll in milliseconds. Only relevant when smoothScroll is set to true. Default: 1000. | ||
"scrollDuration": 1000, | ||
// When the page scrolls, how much space should there be between the bubble/targetElement and the top of the viewport? Default: 200. | ||
"scrollTopMargin": 200, | ||
// Should the tour bubble show a close (X) button? Default: true. | ||
"showCloseButton": true, | ||
// Should the bubble have the Previous button? Default: true. | ||
"showPrevButton": true, | ||
// Should the bubble have the Next button? Default: true. | ||
"showNextButton": true, | ||
// Default arrow width. (space between the bubble and the targetEl) Used for bubble position calculation. This option is provided for the case where the developer wants to use custom CSS to adjust the size of the arrow. Default: 20. | ||
"arrowWidth": 20, | ||
// If a specified target element is not found, should we skip to the next step? Default: true. | ||
"skipIfNoElement": true, | ||
// Should we advance to the next step when the user clicks on the target? Default: false. | ||
"nextOnTargetClick": false, | ||
// For i18n purposes. Allows you to change the text of button labels and step numbers. | ||
"i18n": { | ||
// Label for next button | ||
"nextBtn": "${intro.next}", | ||
// Label for prev button | ||
"prevBtn": "${intro.back}", | ||
// Label for done button | ||
"doneBtn": "${intro.skip}", | ||
// Label for skip button | ||
"skipBtn": "${intro.done}", | ||
// Text for close button tooltip | ||
"closeTooltip": "${intro.closeTooltip}", | ||
// Provide a list of strings to be shown as the step number, based on index of array. Unicode characters are supported. (e.g., ['一', '二', '三']) If there are more steps than provided numbers, Arabic numerals ('4', '5', '6', etc.) will be used as default. | ||
"stepNums": [] | ||
}, | ||
// Step configuration | ||
"steps": [ | ||
{ | ||
// id of the target DOM element or DOM element itself. It is also possible to define an array of several targets. If an array is provided, Hopscotch will use the first target that exists on the page and disregard the rest. | ||
"target": ".mainMap", | ||
// specifies where the bubble should appear in relation to the target. Valid values are "top", "bottom", "right", "left". | ||
"placement": "top", | ||
// step title | ||
"title": "${intro.familiarise.title}", | ||
// step content | ||
"content": "${intro.familiarise.content}", | ||
// bubble width | ||
"width": 280, | ||
// bubble padding | ||
"padding": 15, | ||
// horizontal position adjustment for bubble. Value can be number of pixels or "center". Default: 0. | ||
"xOffset": "center", | ||
// vertical position adjustment for bubble. Value can be number of pixels or "center". Default: 0. | ||
"yOffset": "center", | ||
// offset for the bubble arrow. Value can be number of pixels or "center". Default: 0. | ||
"arrowOffset": "center", | ||
// number in milliseconds to wait before showing step. Default: 0. | ||
"delay": 0, | ||
// sets the z-index of the bubble | ||
"zindex": 0, | ||
// should show the next button. Default: true. | ||
"showNextButton": true, | ||
// should show the prev button. Default: true. | ||
"showPrevButton": true, | ||
// should show the call-to-action button. Default: false. | ||
"showCTAButton": false, | ||
// label for the call-to-action button. | ||
"ctaLabel": "", | ||
// indicates that the next step is on a different page. Default: false. | ||
"multipage": false, | ||
// if true, 'Next' button reads 'Skip'. Default: false. | ||
"showSkip": false, | ||
// set to true if the target element has fixed positioning. Default: false. | ||
"fixedElement": false, | ||
// triggers nextStep() when the target is clicked. Default: false. | ||
"nextOnTargetClick": false | ||
}, | ||
{ | ||
"target": ".mapview_tools", | ||
"placement": "left", | ||
"title": "${intro.mapview.title}", | ||
"content": "${intro.mapview.content}" | ||
}, | ||
{ | ||
"target": ".basemapToggler", | ||
"placement": "bottom", | ||
"title": "${intro.basemap.title}", | ||
"content": "${intro.basemap.content}", | ||
"xOffset": -20, | ||
"arrowOffset": 40 | ||
}, | ||
... | ||
] | ||
} | ||
} | ||
``` | ||
**Requirement: map.apps 4** | ||
|
||
There are to tools that provides different functions: | ||
* introTool: shows a widget that allows the user to start the intro and hide it on next startup. | ||
* introImmediateTool: starts the intro immediately. | ||
[dn_intro Documentation](https://github.com/conterra/mapapps-intro/tree/master/src/main/js/bundles/dn_intro) | ||
|
||
## Development Guide | ||
|
||
Development Guide | ||
------------------ | ||
### Define the mapapps remote base | ||
|
||
Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file: | ||
`<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>` | ||
|
||
##### Other methods to to define the mapapps.remote.base property. | ||
### Other methods to to define the mapapps.remote.base property. | ||
|
||
1. Goal parameters | ||
`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%` | ||
`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%` | ||
|
||
2. Build properties | ||
Change the mapapps.remote.base in the build.properties file and run: | ||
`mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties` | ||
2. Build properties Change the mapapps.remote.base in the build.properties file and run: | ||
`mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright (C) 2019 con terra GmbH ([email protected]) | ||
# Copyright (C) 2021 con terra GmbH ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
Oops, something went wrong.