Skip to content

Commit eb40877

Browse files
Christoph Wolfescesmarvin
authored andcommitted
Merge branch 'release/v1.21.5-1'
2 parents 513385e + c1cc776 commit eb40877

18 files changed

Lines changed: 5180 additions & 10 deletions

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [v1.21.5-1] - 2022-01-19
11+
### Changed
12+
- Add integration tests for custom static HTML page #51
13+
- Upgrade to nginx 1.21.5; #51
14+
1015
## [v1.17.10-9] - 2021-11-22
1116
### Changed
1217
- update warp menu to version 1.3.0
1318

1419
## [v1.17.10-8] - 2021-11-02
15-
1620
### Changed
1721
- The script to append the warp menu to each page is now hosted instead of inline (#49)
1822
- Use logging/root key

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM registry.cloudogu.com/official/base:3.11.6-3 as builder
2-
LABEL maintainer="michael.behlendorf@cloudogu.com"
2+
LABEL maintainer="hello@cloudogu.com"
33

44
# dockerfile is based on https://github.com/dockerfile/nginx and https://github.com/bellycard/docker-loadbalancer
55

6-
ENV NGINX_VERSION 1.17.10
7-
ENV NGINX_TAR_SHA256="a9aa73f19c352a6b166d78e2a664bb3ef1295bbe6d3cc5aa7404bd4664ab4b83"
6+
ENV NGINX_VERSION 1.21.5
7+
ENV NGINX_TAR_SHA256="b20f3bf533a518a6f0f3a7967dfeed872d268d31e4cc121a0001329602ddcfbb"
88

99
COPY nginx-build /
1010
RUN set -x \
@@ -22,7 +22,7 @@ RUN set -x \
2222
FROM registry.cloudogu.com/official/base:3.12.4-1
2323
LABEL maintainer="hello@cloudogu.com" \
2424
NAME="official/nginx" \
25-
VERSION="1.17.10-9"
25+
VERSION="1.21.5-1"
2626

2727
ENV CES_CONFD_VERSION=0.5.1 \
2828
CES_CONFD_TAR_SHA256="f8776bc473beeacda8ff502861906bb9ab6eeda365513290116697cc6f68eee8" \

Jenkinsfile

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ node('vagrant') {
1010
// Keep only the last x builds to preserve space
1111
buildDiscarder(logRotator(numToKeepStr: '10')),
1212
// Don't run concurrent builds for a branch, because they use the same workspace directory
13-
disableConcurrentBuilds()
13+
disableConcurrentBuilds(),
14+
// Parameter to activate dogu upgrade test on demand
15+
parameters([
16+
booleanParam(defaultValue: true, description: 'Enables cypress to record video of the integration tests.', name: 'EnableVideoRecording'),
17+
booleanParam(defaultValue: true, description: 'Enables cypress to take screenshots of failing integration tests.', name: 'EnableScreenshotRecording'),
18+
booleanParam(defaultValue: false, description: 'Test dogu upgrade from latest release or optionally from defined version below', name: 'TestDoguUpgrade'),
19+
string(defaultValue: '', description: 'Old Dogu version for the upgrade test (optional; e.g. 3.23.0-1)', name: 'OldDoguVersionForUpgradeTest')
20+
])
1421
])
1522

1623
EcoSystem ecoSystem = new EcoSystem(this, "gcloud-ces-operations-internal-packer", "jenkins-gcloud-ces-operations-internal")
@@ -30,7 +37,7 @@ node('vagrant') {
3037
}
3138

3239
stage('Shellcheck'){
33-
shellCheck()
40+
shellCheck('./resources/startup.sh ./nginx-build/build.sh')
3441
}
3542

3643
try {
@@ -48,10 +55,41 @@ node('vagrant') {
4855
ecoSystem.build("/dogu")
4956
}
5057

58+
stage('Prepare Static HTML Config') {
59+
ecoSystem.vagrant.ssh "sudo cp /dogu/integrationTests/privacy_policies.html /var/lib/ces/nginx/volumes/customhtml/"
60+
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\\"}' '''
61+
}
62+
5163
stage('Verify') {
5264
ecoSystem.verify("/dogu")
5365
}
5466

67+
stage('Integration tests') {
68+
ecoSystem.runCypressIntegrationTests([cypressImage : "cypress/included:8.6.0",
69+
enableVideo : params.EnableVideoRecording,
70+
enableScreenshots: params.EnableScreenshotRecording])
71+
}
72+
73+
if (params.TestDoguUpgrade != null && params.TestDoguUpgrade) {
74+
stage('Upgrade dogu') {
75+
// Remove new dogu that has been built and tested above
76+
ecoSystem.purgeDogu(doguName)
77+
78+
if (params.OldDoguVersionForUpgradeTest != '' && !params.OldDoguVersionForUpgradeTest.contains('v')) {
79+
println "Installing user defined version of dogu: " + params.OldDoguVersionForUpgradeTest
80+
ecoSystem.installDogu("testing/" + doguName + " " + params.OldDoguVersionForUpgradeTest)
81+
} else {
82+
println "Installing latest released version of dogu..."
83+
ecoSystem.installDogu("testing/" + doguName)
84+
}
85+
ecoSystem.startDogu(doguName)
86+
ecoSystem.waitForDogu(doguName)
87+
ecoSystem.upgradeDogu(ecoSystem)
88+
89+
// Wait for upgraded dogu to get healthy
90+
ecoSystem.waitForDogu(doguName)
91+
}
92+
}
5593
if (gitflow.isReleaseBranch()) {
5694
String releaseVersion = git.getSimpleBranchName();
5795

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It is possible to deliver HTML content pages via the nginx dogu and navigate to
3636
</body>
3737
</html>
3838
```
39-
1) Save the HTML site as `privacy-policies.html` in the volume `/var/lib/ces/nginx/volumes/customhtml/`. Note: You can store all your HTML files in this volume. After restarting the nginx dogu the website should be accessible via `fqdn/static/privacy-policies.html`.
39+
1) Save the HTML site as `privacy_policies.html` in the volume `/var/lib/ces/nginx/volumes/customhtml/`. Note: You can store all your HTML files in this volume. After restarting the nginx dogu the website should be accessible via `fqdn/static/privacy-policies.html`.
4040
2) For every link we want to show in the warpmenu we need to create an etcdctl key in the form of `etcdctl /config/nginx/externals/<websitename>`. For our example page, we create the following key: `/config/nginx/externals/privacy_policies`. The value for the key needs to be a JSON object containing the following information:
4141
```
4242
{

docs/dev/integration_tests_de.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Aufsetzen der Integrations Tests
2+
3+
Die Integration Tests, welche sich unter integrationTests/ befinden, können wie folgt ausgeführt werden:
4+
5+
```bash
6+
cd integrationTests
7+
yarn install
8+
yarn cypress open
9+
```

docs/dev/integration_tests_en.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Setting up the integration tests
2+
3+
The integration tests, which are located under integrationTests/, can be executed as follows:
4+
5+
```bash
6+
cd integrationTests
7+
yarn install
8+
yarn cypress open
9+
```

dogu.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "official/nginx",
3-
"Version": "1.17.10-9",
3+
"Version": "1.21.5-1",
44
"DisplayName": "Nginx",
55
"Description": "Nginx WebServer.",
66
"Logo": "https://cloudogu.com/images/dogus/nginx.png",
@@ -13,7 +13,10 @@
1313
"Url": "http://nginx.org/",
1414
"Image": "registry.cloudogu.com/official/nginx",
1515
"Dependencies": [
16-
"registrator"
16+
{
17+
"type": "dogu",
18+
"name": "registrator"
19+
}
1720
],
1821
"Configuration": [
1922
{

integrationTests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

integrationTests/cypress.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"baseUrl": "https://192.168.56.2",
3+
"env": {
4+
"casPath": "/cas",
5+
"nameOfCustomPageLinkInWarpMenu": "Privacy Policies",
6+
"customHTMLPath": "/static/privacy_policies.html"
7+
},
8+
"videoCompression": false,
9+
"nonGlobalStepBaseDir": false,
10+
"experimentalSessionSupport": true
11+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Feature: Searches for the custom HTML page
2+
3+
Scenario: opening the warp menu and looking for the link of the custom HTML page
4+
When the user opens the always existing cas ui
5+
Then the user opens the warp menu
6+
Then the user checks link corresponding to the custom page
7+
8+
Scenario: entering the ressource URL into browser and opening the static custom HTML page
9+
When the user requests the static custom HTML page
10+
Then a static HTML custom page gets displayed

0 commit comments

Comments
 (0)