Skip to content

Commit 46b8da4

Browse files
committed
issue-1622: Implement custom web console which allows to execute Gremlin and Cypher queries
0 parents  commit 46b8da4

File tree

104 files changed

+24053
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+24053
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

Jenkinsfile

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
@Library('jenkins-shared-libraries') _
2+
3+
def ARTIFACT_ID = 'strongbox-database-ui'
4+
def SERVER_ID = 'carlspring-oss-snapshots'
5+
def DEPLOY_SERVER_URL = 'https://repo.carlspring.org/content/repositories/carlspring-oss-snapshots/'
6+
def PR_SERVER_URL = 'https://repo.carlspring.org/content/repositories/carlspring-oss-pull-requests/'
7+
8+
// Notification settings for "master" and "branch/pr"
9+
def notifyMaster = [notifyAdmins: true, recipients: [culprits(), requestor()]]
10+
def notifyBranch = [recipients: [brokenTestsSuspects(), requestor()], notifyByChat: false]
11+
12+
pipeline {
13+
agent {
14+
label 'ubuntu-jdk8-mvn3.6-node12-browsers'
15+
}
16+
parameters {
17+
booleanParam(defaultValue: false, description: 'Force deploy?', name: 'FORCE_DEPLOY')
18+
booleanParam(defaultValue: false, description: 'Clear .npm cache on node?', name: 'CLEAR_CACHE')
19+
booleanParam(defaultValue: true, description: 'Send email notification?', name: 'NOTIFY_EMAIL')
20+
}
21+
options {
22+
timeout(time: 2, unit: 'HOURS')
23+
disableConcurrentBuilds()
24+
}
25+
environment {
26+
// Necessary for NPM to avoid being asked questions.
27+
CI="true"
28+
}
29+
stages {
30+
stage('Node') {
31+
steps {
32+
container("node") {
33+
nodeInfo("npm yarn node mvn")
34+
}
35+
}
36+
}
37+
stage('Install dependencies') {
38+
steps {
39+
script {
40+
container("node") {
41+
def npmCachePath = workspace().getNPMCachePath()
42+
43+
if(params.CLEAR_CACHE) {
44+
sh label: "Clearing ${npmCachePath}", script: "rm -rf ${npmCachePath}/*"
45+
}
46+
47+
sh label: "Set NPM cache directory", script: "npm config set cache ${npmCachePath}"
48+
sh label: "Install dependencies", script: "npm install"
49+
sh label: "List installed packages", script: "npm ls --depth=0 || echo ''"
50+
}
51+
}
52+
}
53+
}
54+
stage('Build') {
55+
steps {
56+
container("node") {
57+
sh "npm run ci-build"
58+
}
59+
}
60+
}
61+
stage('Tests') {
62+
parallel {
63+
stage('ci-test') {
64+
steps {
65+
script {
66+
container("node") {
67+
try {
68+
sh "npm run ci-test"
69+
} catch (e) {
70+
if(!params.FORCE_DEPLOY) {
71+
currentBuild.result = 'FAILURE'
72+
throw e
73+
}
74+
}
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}
81+
stage('Deploy') {
82+
when {
83+
expression { (params.FORCE_DEPLOY || currentBuild.result == null || currentBuild.result == 'SUCCESS') }
84+
}
85+
steps {
86+
script {
87+
container("node") {
88+
withMavenPlus(mavenLocalRepo: workspace().getM2LocalRepoPath(), mavenSettingsConfig: 'a5452263-40e5-4d71-a5aa-4fc94a0e6833', publisherStrategy: 'EXPLICIT', options: [artifactsPublisher(), mavenLinkerPublisher()])
89+
{
90+
def SERVER_URL;
91+
def VERSION_ID;
92+
93+
if (BRANCH_NAME == 'master') {
94+
echo "Deploying master..."
95+
SERVER_URL = DEPLOY_SERVER_URL;
96+
VERSION_ID = "1.0-SNAPSHOT"
97+
} else {
98+
echo "Deploying branch/PR"
99+
SERVER_URL = PR_SERVER_URL;
100+
if(env.CHANGE_ID) {
101+
VERSION_ID = "1.0-PR-${env.CHANGE_ID}-SNAPSHOT"
102+
} else {
103+
VERSION_ID = "1.0-${BRANCH_NAME}-SNAPSHOT"
104+
}
105+
}
106+
107+
sh "mvn deploy:deploy-file " +
108+
" -Dfile=./dist/packaging/"+ ARTIFACT_ID +".zip " +
109+
" -DrepositoryId=" + SERVER_ID +
110+
" -Durl=" + SERVER_URL +
111+
" -DartifactId=" + ARTIFACT_ID +
112+
" -DgroupId=org.carlspring.strongbox" +
113+
" -Dpackaging=zip" +
114+
" -Dversion=" + VERSION_ID
115+
}
116+
}
117+
}
118+
}
119+
}
120+
}
121+
post {
122+
failure {
123+
script {
124+
if(params.NOTIFY_EMAIL) {
125+
notifyFailed((BRANCH_NAME == "master") ? notifyMaster : notifyBranch)
126+
}
127+
}
128+
}
129+
unstable {
130+
script {
131+
if(params.NOTIFY_EMAIL) {
132+
notifyUnstable((BRANCH_NAME == "master") ? notifyMaster : notifyBranch)
133+
}
134+
}
135+
}
136+
fixed {
137+
script {
138+
if(params.NOTIFY_EMAIL) {
139+
notifyFixed((BRANCH_NAME == "master") ? notifyMaster : notifyBranch)
140+
}
141+
}
142+
}
143+
always {
144+
container("node") {
145+
junit 'dist/TESTS-*.xml'
146+
}
147+
148+
script {
149+
150+
def isSuccessful = currentBuild.result == 'SUCCESS';
151+
152+
if((params.TRIGGER_STRONGBOX && isSuccessful) || params.FORCE_DEPLOY) {
153+
if(BRANCH_NAME == "master") {
154+
build job: '/strongbox/builds/strongbox/master',
155+
wait: false,
156+
parameters: [
157+
string(name: 'INTEGRATION_TESTS_BRANCH', value: 'master'),
158+
booleanParam(name: 'RUN_ONLY_SMOKE', value: false),
159+
booleanParam(name: 'SKIP_TESTS', value: false),
160+
booleanParam(name: 'DEPLOY', value: true),
161+
booleanParam(name: 'NOTIFY_EMAIL', value: true)
162+
]
163+
}
164+
}
165+
}
166+
}
167+
}
168+
}

0 commit comments

Comments
 (0)