Skip to content

Commit a8b57fb

Browse files
cbeyer42cesmarvin
authored andcommitted
Merge branch 'release/v1.10.0-1'
2 parents fc5799b + a75ae93 commit a8b57fb

File tree

176 files changed

+9993
-16888
lines changed

Some content is hidden

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

176 files changed

+9993
-16888
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**/app.vagrant/**
22
**/app/node_modules/**
3+
**/app/**/node_modules/**
34
**/app/target/**
45
**/usermgt.iml

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ app/.project
2727
*.iml
2828
**/target/**
2929
**/build/tmp/**
30+
.npmrc

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v1.10.0-1] - 2023-04-20
10+
### Changed
11+
- Rewrite frontend with React (#77)
12+
- Extend search endpoint to pass a list of excluded values (#77)
13+
- Update documentation with current screenshots and better explanations (#81)
14+
- Update cypress-version for integration-tests (#78)
15+
16+
### Added
17+
- New integration-tests for rewritten frontend (#78)
18+
919
## [v1.9.0-1] - 2022-11-14
1020
### Changed
1121
- Add Backend Endpoint for the User Import via CSV-File (#69)

Dockerfile

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
FROM openjdk:8u302-jdk as builder
2-
COPY app/ /usermgt
1+
FROM timbru31/java-node:8-jdk-18 as builder
2+
COPY app/pom.xml /usermgt/pom.xml
3+
COPY app/mvnw /usermgt/mvnw
4+
COPY app/.mvn /usermgt/.mvn
35
RUN set -x \
4-
&& cd /usermgt \
5-
&& ./mvnw package
6+
&& cd /usermgt \
7+
&& ./mvnw dependency:resolve-plugins dependency:resolve
68

9+
COPY app/ /usermgt
10+
RUN set -x \
11+
&& cd /usermgt \
12+
&& ./mvnw package
713

814
FROM registry.cloudogu.com/official/java:8u302-3
915

1016
LABEL NAME="official/usermgt" \
11-
VERSION="1.9.0-1" \
17+
VERSION="1.10.0-1" \
1218
maintainer="[email protected]"
1319

1420
# mark as webapp for nginx
@@ -59,7 +65,7 @@ COPY resources /
5965
EXPOSE 8080
6066

6167
# healtcheck
62-
HEALTHCHECK CMD doguctl healthy usermgt || exit 1
68+
HEALTHCHECK --interval=5s CMD doguctl healthy usermgt || exit 1
6369

6470
# execution
6571
CMD /startup.sh

Jenkinsfile

+43-10
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ node('docker') {
3030
GitHub github = new GitHub(this, git)
3131
Changelog changelog = new Changelog(this)
3232

33-
// Workaround SUREFIRE-1588 on Debian/Ubuntu. Should be fixed in Surefire 3.0.0
34-
mvn.additionalArgs = '-DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true"'
35-
3633
stage('Checkout') {
3734
checkout scm
3835
// Don't remove folders starting in "." like * .m2 (maven), .npm, .cache, .local (bower)
3936
git.clean('".*/"')
37+
createNpmrcFile("jenkins")
4038
}
4139

4240
stage('Lint') {
@@ -51,7 +49,7 @@ node('docker') {
5149

5250
// Run inside of docker container, because karma always starts on port 9876 which might lead to errors when two
5351
// builds run concurrently (e.g. feature branch, PR and develop)
54-
new Docker(this).image('openjdk:8-jdk')
52+
new Docker(this).image('timbru31/java-node:8-jdk-18')
5553
.mountJenkinsUser()
5654
.inside {
5755

@@ -62,7 +60,7 @@ node('docker') {
6260
}
6361

6462
stage('Unit Test') {
65-
mvn 'test'
63+
mvn 'test jacoco:report'
6664
}
6765
}
6866
}
@@ -147,11 +145,11 @@ node('docker') {
147145

148146
stage('Integration Tests') {
149147
echo "run integration tests."
150-
ecoSystem.runCypressIntegrationTests([
151-
cypressImage: "cypress/included:8.6.0",
152-
enableVideo: params.EnableVideoRecording,
153-
enableScreenshots : params.EnableScreenshotRecording,
154-
])
148+
ecoSystem.runCypressIntegrationTests([
149+
cypressImage: "cypress/included:12.9.0",
150+
enableVideo: params.EnableVideoRecording,
151+
enableScreenshots : params.EnableScreenshotRecording,
152+
])
155153
}
156154

157155
if (params.TestDoguUpgrade != null && params.TestDoguUpgrade){
@@ -203,6 +201,7 @@ node('docker') {
203201
} finally {
204202
stage('Clean') {
205203
ecoSystem.destroy()
204+
sh "rm -f ${WORKSPACE}/app/src/main/ui/.npmrc"
206205
}
207206
}
208207

@@ -237,3 +236,37 @@ def executeShellTests() {
237236
junit allowEmptyResults: true, testResults: 'target/shell_test_reports/*.xml'
238237
}
239238
}
239+
240+
void createNpmrcFile(credentialsId) {
241+
withCredentials([usernamePassword(credentialsId: "${credentialsId}", usernameVariable: 'TARGET_USER', passwordVariable: 'TARGET_PSW')]) {
242+
withEnv(["HOME=${env.WORKSPACE}"]) {
243+
String NPM_TOKEN = """${sh(
244+
returnStdout: true,
245+
script: 'echo -n "${TARGET_USER}:${TARGET_PSW}" | openssl base64'
246+
)}""".trim()
247+
writeFile encoding: 'UTF-8', file: 'app/src/main/ui/.npmrc', text: """
248+
@cloudogu:registry=https://ecosystem.cloudogu.com/nexus/repository/npm-releases/
249+
250+
always-auth=true
251+
_auth=${NPM_TOKEN}
252+
""".trim()
253+
}
254+
}
255+
}
256+
257+
/**
258+
* Wrapper around dogu build calls to apply credentials to authenticate against private github repositories.
259+
* @param user name
260+
* @param password or user token
261+
* @param closure
262+
*/
263+
void useConfig(String userName, String token, Closure closure) {
264+
try {
265+
createNpmrcFile("jenkins")
266+
closure.call()
267+
} catch (err) {
268+
throw err
269+
} finally {
270+
sh "rm -f ${WORKSPACE}/app/src/main/ui/.npmrc"
271+
}
272+
}

Makefile

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Set these to the desired values
22
ARTIFACT_ID=usermgt
3-
VERSION=1.9.0-1
3+
VERSION=1.10.0-1
44
# overwrite ADDITIONAL_LDFLAGS to disable static compilation
55
# this should fix https://github.com/golang/go/issues/13470
66
ADDITIONAL_LDFLAGS=""
7+
NPM_REGISTRY_RELEASE=https://ecosystem.cloudogu.com/nexus/repository/npm-releases/
8+
NPM_REGISTRY_RC=https://ecosystem.cloudogu.com/nexus/repository/npm-releasecandidates/
9+
UI_SRC=app/src/main/ui
710
MAKEFILES_VERSION=4.2.0
811
.DEFAULT_GOAL:=default
912

@@ -13,3 +16,24 @@ include build/make/release.mk
1316
include bats.mk
1417

1518
default: dogu-release
19+
20+
.PHONY info:
21+
info:
22+
@echo Generating .npmrc file
23+
@echo This will overwrite the existing file including the previosly generated credentials
24+
25+
.PHONY gen-npmrc-release:
26+
gen-npmrc-release: info
27+
@rm -f .npmrc
28+
@echo "[email protected]" >> ${UI_SRC}/.npmrc
29+
@echo "always-auth=true" >> ${UI_SRC}/.npmrc
30+
@echo "_auth=$(shell bash -c 'read -p "Username: " usrname;read -s -p "Password: " pwd;echo -n "$$usrname:$$pwd" | openssl base64')" >> ${UI_SRC}/.npmrc
31+
@echo "@cloudogu:registry=${NPM_REGISTRY_RELEASE}" >> ${UI_SRC}/.npmrc
32+
33+
.PHONY gen-npmrc-prerelease:
34+
gen-npmrc-prerelease: info
35+
@rm -f .npmrc
36+
@echo "[email protected]" >> ${UI_SRC}/.npmrc
37+
@echo "always-auth=true" >> ${UI_SRC}/.npmrc
38+
@echo "_auth=$(shell bash -c 'read -p "Username: " usrname;read -s -p "Password: " pwd;echo -n "$$usrname:$$pwd" | openssl base64')" >> ${UI_SRC}/.npmrc
39+
@echo "@cloudogu:registry=${NPM_REGISTRY_RC}" >> ${UI_SRC}/.npmrc

app/.bowerrc

-3
This file was deleted.

app/bower.json

-25
This file was deleted.

app/gulpfile.js

-78
This file was deleted.

0 commit comments

Comments
 (0)