Skip to content

Commit

Permalink
Merge branch 'release/v1.21.5-3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Wolfes authored and cesmarvin committed Mar 23, 2022
2 parents 3fa290c + 13ce91f commit 4fbd3de
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.21.5-3] - 2022-03-23
### Changed
- changed config.yaml.tpl to support support-entries from ces-confd
- update ces-confd to version v0.6.0
- update warp-menu to version v1.4.0

## [v1.21.5-2] - 2022-01-28
### Changed
- Upgrade to ces-theme v0.7.0
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ RUN set -x \
FROM registry.cloudogu.com/official/base:3.14.2-2
LABEL maintainer="[email protected]" \
NAME="official/nginx" \
VERSION="1.21.5-2"
VERSION="1.21.5-3"

ENV CES_CONFD_VERSION=0.5.1 \
CES_CONFD_TAR_SHA256="f8776bc473beeacda8ff502861906bb9ab6eeda365513290116697cc6f68eee8" \
WARP_MENU_VERSION=1.3.0 \
WARP_MENU_TAR_SHA256="f1ebc305ac03a2b59d8eb9b5624a26a3e5803bb8b6969df271c702bdb257792c" \
ENV CES_CONFD_VERSION=0.6.0 \
CES_CONFD_TAR_SHA256="069d45503149d67585e7ff15ce5cb1fe125c4cda4f69230dbf65851ccd88ad58" \
WARP_MENU_VERSION=1.4.0 \
WARP_MENU_TAR_SHA256="51febb14ce984bf6f7486d212b3ef8a8fa38ff594bac7d764347778b6eb681a9" \
CES_ABOUT_VERSION=0.2.2 \
CES_ABOUT_TAR_SHA256="9926649be62d8d4667b2e7e6d1e3a00ebec1c4bbc5b80a0e830f7be21219d496" \
CES_THEME_VERSION=v0.7.0 \
Expand Down
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ node('vagrant') {
ecoSystem.build("/dogu")
}

stage('Prepare Static HTML Config') {
stage('Prepare integration tests') {
// static HTML config
ecoSystem.vagrant.ssh "sudo cp /dogu/integrationTests/privacy_policies.html /var/lib/ces/nginx/volumes/customhtml/"
ecoSystem.vagrant.ssh '''etcdctl set config/nginx/externals/privacy_policies '{\\"DisplayName\\":\\"Privacy Policies\\",\\"Description\\":\\"Contains information about the privacy policies enforced by our company\\",\\"Category\\":\\"Information\\",\\"URL\\":\\"/static/privacy_policies.html\\"}' '''
// etcd key for support entries
ecoSystem.vagrant.ssh '''etcdctl set /config/_global/disabled_warpmenu_support_entries '[\\"myCloudogu\\", \\"aboutCloudoguToken\\"]' '''
}

stage('Verify') {
Expand Down
8 changes: 8 additions & 0 deletions docs/dev/integration_tests_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

Die Integration Tests, welche sich unter integrationTests/ befinden, können wie folgt ausgeführt werden:

Um die Tests lokal auszuführen muss vorher die statische HTML Seite im vagrant hinterlegt werden.
`sudo cp /vagrant/containers/nginx/integrationTests/privacy_policies.html /var/lib/ces/nginx/volumes/customhtml/`
Außerdem muss der etcd Key `privacy_policies` gesetzt werden

`etcdctl set config/nginx/externals/privacy_policies '{"DisplayName":"Privacy Policies","Description":"Contains information about the privacy policies enforced by our company","Category":"Information","URL":"/static/privacy_policies.html"}'`

Danach können die Tests mit:
```bash
cd integrationTests
yarn install
yarn cypress open
```
ausgeführt werden.
8 changes: 8 additions & 0 deletions docs/dev/integration_tests_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

The integration tests, which are located under integrationTests/, can be executed as follows:

To run the tests locally, the static HTML page must first be stored in vagrant.
sudo cp /vagrant/containers/nginx/integrationTests/privacy_policies.html /var/lib/ces/nginx/volumes/customhtml/`
Also the etcd key `privacy_policies` must be set

`etcdctl set config/nginx/externals/privacy_policies '{"DisplayName": "PrivacyPolicies", "Description": "Contains information about the privacy policies enforced by our company", "Category": "Information", "URL":"/static/privacy_policies.html"}'`.

After that the tests cann be run with:

```bash
cd integrationTests
yarn install
Expand Down
26 changes: 26 additions & 0 deletions docs/dev/support_entries_in_warp_menu_de.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Support-Einträge für das Warp-Menü konfigurieren

Das warp-menu generiert die Einträge im Menü über eine sogenannte menu.json.
Diese wird in der ces-confd erstellt. In dieser sind die dynamischen dogu-Einträge und die Support-Einträge enthalten.
Die Supporteinträge können über die configuration.yaml.tpl in diesem Repository geändert werden.

Wenn Einträge im warp-menu nicht gerendert werden sollen, kann der etcd-Schlüssel `/config/_global/disabled_warpmenu_support_entries` mit einer Liste von Schlüsseln versehen werden, die nicht gerendert werden sollen.

Zum Beispiel, wenn die folgenden Einträge in der configuration.yaml unter dem Schlüssel `support` angegeben sind:
```
warp:
...
Unterstützung:
- Bezeichner: docsCloudoguComUrl
extern: wahr
href: https://path/to/extern/site.com
- Bezeichner: aboutCloudoguToken
extern: falsch
href: /pfad/zu/intern/site
- Bezeichner: myCloudogu
extern: wahr
href: https://path/to/extern/site.com
```

und die ersten beiden sollten NICHT angezeigt werden, dann kann man den etcd-Schlüssel auf etwas wie folgt setzen:
`etcdctl set /config/_global/disabled_warpmenu_support_entries '["docsCloudoguComUrl", "aboutCloudoguToken"]'`.
26 changes: 26 additions & 0 deletions docs/dev/support_entries_in_warp_menu_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Configure support entries for the warp menu

The warp-menu generates the entries in the menu via a so-called menu.json.
This is built in the ces-confd. In this the dynamic dogu entries and the support entries are contained.
The support entries can be changed via the configuration.yaml.tpl in this repository.

If entries in the warp-menu should not be rendered the etcd key `/config/_global/disabled_warpmenu_support_entries` can be provided with a list of keys which will not be rendered.

For example, if the following entries are specified in the configuration.yaml under the key `support`:
```
warp:
...
support:
- identifier: docsCloudoguComUrl
external: true
href: https://path/to/extern/site.com
- identifier: aboutCloudoguToken
external: false
href: /pfad/to/intern/site
- identifier: myCloudogu
external: true
href: https://path/to/extern/site.com
```

and the first two should NOT be displayed than you can set the etcd-key to sth. like:
`etcdctl set /config/_global/disabled_warpmenu_support_entries '["docsCloudoguComUrl", "aboutCloudoguToken"]'`.
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/nginx",
"Version": "1.21.5-2",
"Version": "1.21.5-3",
"DisplayName": "Nginx",
"Description": "Nginx WebServer.",
"Logo": "https://cloudogu.com/images/dogus/nginx.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Feature: display support entries
Scenario: opening the warp menu when a etcd-key is set
Given the warp menu is open
Then the warp menu category 'Support' contains a link to docs and no link to mycloudogu or the about page
9 changes: 9 additions & 0 deletions integrationTests/cypress/support/step_definitions/given.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const {
Given
} = require("cypress-cucumber-preprocessor/steps");


Given(/^the warp menu is open$/, function () {
cy.visit(Cypress.config().baseUrl + Cypress.env('casPath'));
cy.get('*[class^=" warp-menu-column-toggle"]').children('*[id^="warp-menu-warpbtn"]').click();
});
11 changes: 10 additions & 1 deletion integrationTests/cypress/support/step_definitions/then.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {
} = require("cypress-cucumber-preprocessor/steps");

Then(/^the user opens the warp menu$/, function () {
cy.get('*[class^=" warp-menu-column-toggle"]').children('*[id^="warp-menu-warpbtn"]').click();
cy.get('*[class^=" warp-menu-column-toggle"]').children('*[id^="warp-menu-warpbtn"]').click();
});

Then(/^the user checks link corresponding to the custom page$/, function () {
Expand All @@ -15,4 +15,13 @@ Then(/^the user checks link corresponding to the custom page$/, function () {

Then("a static HTML custom page gets displayed", function () {
cy.visit(Cypress.config().baseUrl + Cypress.env('customHTMLPath'));
});

Then(/^the warp menu category 'Support' contains a link to docs and no link to mycloudogu or the about page$/, function () {

cy.get('[id^=warpc][id$=support]').parent().children('ul').children().should('have.length', 2)

cy.get('*[class^=" warp-menu-shift-container"]')
.children('*[class^=" warp-menu-category-list"]')
.contains("Cloudogu EcoSystem Docs")
});
10 changes: 10 additions & 0 deletions resources/etc/ces-confd/config.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ warp:
target: /var/www/html/warp/menu.json
order:
Development Apps: 100
support:
- identifier: docsCloudoguComUrl
external: true
href: https://docs.cloudogu.com/
- identifier: aboutCloudoguToken
external: false
href: /info/about
- identifier: myCloudogu
external: true
href: https://my.cloudogu.com/

service:
source:
Expand Down

0 comments on commit 4fbd3de

Please sign in to comment.