Skip to content

Commit

Permalink
Merge branch 'release/v1.7.2-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudgge authored and cesmarvin committed Nov 10, 2023
2 parents a734bde + dc38733 commit b7f7ebf
Show file tree
Hide file tree
Showing 24 changed files with 1,056 additions and 3,515 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.7.2-1] - 2023-11-10
### Changed
- [#211] Target javascript version to es6
- Update used version of nodejs to 18.7.0
- Update used version of yarn to 1.22.19
- Update java base image to v17.0.9-1

### Fixed
- [#211] Fix integration tests after upgrading CAS
- [#213] Eliminate CVEs by switching from the deprecated lib momentjs to dayjs

## [v1.7.1-1] - 2023-03-31
### Fixed
- [#209] Fix execution of tests in build process
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17.0.6_10-jdk as builder
FROM eclipse-temurin:17.0.9_9-jdk as builder

ENV SMEAGOL_DIR=/usr/src/smeagol
COPY mvnw pom.xml package.json yarn.lock .prettierrc ${SMEAGOL_DIR}/
Expand All @@ -16,9 +16,9 @@ RUN set -x \



FROM registry.cloudogu.com/official/java:17.0.6-1
FROM registry.cloudogu.com/official/java:17.0.9-1
LABEL NAME="official/smeagol" \
VERSION="1.7.1-1" \
VERSION="1.7.2-1" \
maintainer="hello@cloudogu.com"

ENV SERVICE_TAGS=webapp \
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ parallel(
stage('Integration tests') {
ecoSystem.runCypressIntegrationTests([enableVideo : params.EnableVideoRecording,
enableScreenshots : params.EnableScreenshotRecording,
cypressImage : "cypress/included:8.6.0",])
cypressImage : "cypress/included:12.17.1",])
}

if (params.TestDoguUpgrade != null && params.TestDoguUpgrade) {
Expand Down
5 changes: 3 additions & 2 deletions docs/development/Setup_Integrationtest_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ In diesem Abschnitt werden die benötigten Schritte beschrieben um die Integrati

Damit alle Integrationstests auch einwandfrei funktionieren, müssen vorher einige Daten konfiguriert werden.

**integrationTests/cypress.json** [[Link zur Datei](https://github.com/cloudogu/smeagol/blob/develop/integrationTests/cypress.json)]
<!-- markdown-link-check-disable-next-line -->
**integrationTests/cypress.config.json** [[Link zur Datei](../../integrationTests/cypress.config.js)]

1) Es muss die base-URL auf das Hostsystem angepasst werden.
Dafür muss das Feld `baseUrl` auf die Host-FQDN angepasst werden (`https://local.cloudogu.com`)
2) Es müssen noch weitere Aspekte konfiguriert werden.
Diese werdeb als Umgebungsvariablen in der `cypress.json` gesetzt:
Diese werden als Umgebungsvariablen in der `cypress.config.json` gesetzt:
- `DoguName` - Bestimmt den Namen des jetzigen Dogus und wir beim Routing benutzt.
- `MaxLoginRetries` - Bestimmt die Anzahl der Loginversuche, bevor ein Test fehlschlägt.
- `AdminUsername` - Der Benutzername des CES-Admins.
Expand Down
5 changes: 3 additions & 2 deletions docs/development/Setup_Integrationtest_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ This section describes the steps required to properly run the integration tests.

In order for all integration tests to work properly, some data must be configured beforehand.

**integrationTests/cypress.json** [[Link to file](https://github.com/cloudogu/smeagol/blob/develop/integrationTests/cypress.json)]
<!-- markdown-link-check-disable-next-line -->
**integrationTests/cypress.config.json** [[Link to file](../../integrationTests/cypress.config.js)]

1) The base URL must be adapted to the host system.
For this the field `baseUrl` has to be adjusted to the host FQDN (`https://local.cloudogu.com`).
2) Other aspects must be configured.
These are set as environment variables in the `cypress.json`:
These are set as environment variables in the `cypress.config.json`:
- `DoguName` - Determines the name of the current dogu and will be used in routing.
- `MaxLoginRetries` - Determines the number of login attempts before a test fails.
- `AdminUsername` - The username of the CES admin.
Expand Down
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/smeagol",
"Version": "1.7.1-1",
"Version": "1.7.2-1",
"DisplayName": "Smeagol",
"Description": "Store your technical documentation with in your git repositories",
"Category": "Development Apps",
Expand Down
3 changes: 3 additions & 0 deletions integrationTests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
cypress/videos
cypress/screenshots
37 changes: 37 additions & 0 deletions integrationTests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const doguTestLibrary = require('@cloudogu/dogu-integration-test-library');
const { defineConfig } = require('cypress');
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const preprocessor = require("@badeball/cypress-cucumber-preprocessor");
const createEsbuildPlugin = require("@badeball/cypress-cucumber-preprocessor/esbuild");

async function setupNodeEvents(on, config) {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await preprocessor.addCucumberPreprocessorPlugin(on, config);

on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin.default(config)],
})
);

config = doguTestLibrary.configure(config);

return config;
}

module.exports = defineConfig({
e2e: {
baseUrl: 'https://192.168.56.2',
env: {
"DoguName": "smeagol",
"MaxLoginRetries": 3,
"AdminUsername": "ces-admin",
"AdminPassword": "ecosystem2016",
"AdminGroup": "CesAdministrators"
},
videoCompression: false,
specPattern: ["cypress/e2e/**/*.feature"],
setupNodeEvents,
},
});
12 changes: 0 additions & 12 deletions integrationTests/cypress.json

This file was deleted.

11 changes: 0 additions & 11 deletions integrationTests/cypress/plugins/index.js

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {
When,
Then
} = require("cypress-cucumber-preprocessor/steps");
} = require("@badeball/cypress-cucumber-preprocessor");
const env = require('@cloudogu/dogu-integration-test-library/lib/environment_variables')

// Loads all steps from the dogu integration library into this project
Expand Down
10 changes: 6 additions & 4 deletions integrationTests/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"dependencies": {
"@cloudogu/dogu-integration-test-library": "2.0.0",
"cypress": "8.6.0",
"cypress-cucumber-preprocessor": "4.1.0"
"@badeball/cypress-cucumber-preprocessor": "^16.0.0",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
"@cloudogu/dogu-integration-test-library": "6.0.1",
"cypress": "^12.9.0",
"@bahmutov/cy-api": "^2.2.4"
},
"scripts": {
"updateTests": "mkdir -p cypress/integration/dogu_integration_test_lib && cp -r node_modules/@cloudogu/dogu-integration-test-library/lib/integration/* cypress/integration/dogu_integration_test_lib"
"updateTests": "mkdir -p cypress/e2e/dogu_integration_test_lib && cp -r node_modules/@cloudogu/dogu-integration-test-library/lib/integration/* cypress/e2e/dogu_integration_test_lib"
}
}
Loading

0 comments on commit b7f7ebf

Please sign in to comment.