Skip to content

Commit

Permalink
Merge branch 'release/v1.23.2-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeyer42 authored and cesmarvin committed Jan 23, 2023
2 parents 0344f03 + d28a09e commit 8ba151b
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 35 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.23.2-1] - 2023-01-23
### Changed
- Upgrade to nginx 1.23.2; #64
- Upgrade ces-build-lib to v1.60.1
- Upgrade dogu-build-lib to v1.10.0
- Upgrade warp menu version to 1.7.0 (#67)

## [v1.21.5-8] - 2022-12-13
### Added
- Update ces-confd to 0.8.0 (#63)
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ LABEL maintainer="[email protected]"

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

ENV NGINX_VERSION 1.21.5
ENV NGINX_TAR_SHA256="b20f3bf533a518a6f0f3a7967dfeed872d268d31e4cc121a0001329602ddcfbb"
ENV NGINX_VERSION 1.23.2
ENV NGINX_TAR_SHA256="a80cc272d3d72aaee70aa8b517b4862a635c0256790434dbfc4d618a999b0b46"

COPY nginx-build /
RUN set -x -o errexit \
Expand All @@ -26,12 +26,12 @@ RUN set -x -o errexit \
FROM registry.cloudogu.com/official/base:3.15.3-1
LABEL maintainer="[email protected]" \
NAME="official/nginx" \
VERSION="1.21.5-8"
VERSION="1.23.2-1"

ENV CES_CONFD_VERSION=0.8.0 \
CES_CONFD_TAR_SHA256="365a4033e80af6953d5b6513296a828dfd772a6640533bb51dd9abd34a1e53e8" \
WARP_MENU_VERSION=1.6.0 \
WARP_MENU_TAR_SHA256="297c910ce2287e5322e3f447408e1ccfbc835874983dbab347b21892c74c8a5f" \
WARP_MENU_VERSION=1.7.0 \
WARP_MENU_TAR_SHA256="2e2284244a6d06fbba8ae87818038976bb157314a4eb510f8b17cb338db13d6c" \
CES_ABOUT_VERSION=0.2.2 \
CES_ABOUT_TAR_SHA256="9926649be62d8d4667b2e7e6d1e3a00ebec1c4bbc5b80a0e830f7be21219d496" \
CES_THEME_VERSION=v0.7.0 \
Expand Down Expand Up @@ -90,7 +90,7 @@ VOLUME ["/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]
# Define working directory.
WORKDIR /etc/nginx

HEALTHCHECK CMD doguctl healthy nginx || exit 1
HEALTHCHECK --interval=5s CMD doguctl healthy nginx || exit 1

# Define default command.
ENTRYPOINT ["/startup.sh"]
Expand Down
55 changes: 34 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!groovy
@Library(['github.com/cloudogu/dogu-build-lib@v1.4.1', 'github.com/cloudogu/ces-build-lib@1.48.0']) _
@Library(['github.com/cloudogu/dogu-build-lib@v1.10.0', 'github.com/cloudogu/ces-build-lib@1.60.1']) _
import com.cloudogu.ces.dogubuildlib.*
import com.cloudogu.ces.cesbuildlib.*

node('vagrant') {

String doguName = "nginx"
timestamps{
properties([
// Keep only the last x builds to preserve space
Expand Down Expand Up @@ -56,17 +56,19 @@ node('vagrant') {
}

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\\"]' '''
setIntegrationTestKeys(ecoSystem)
}

stage('Verify') {
ecoSystem.verify("/dogu")
}

stage('Wait for dependencies') {
timeout(15) {
ecoSystem.waitForDogu("cas")
}
}

stage('Integration tests') {
ecoSystem.runCypressIntegrationTests([cypressImage : "cypress/included:8.6.0",
enableVideo : params.EnableVideoRecording,
Expand All @@ -75,22 +77,25 @@ node('vagrant') {

if (params.TestDoguUpgrade != null && params.TestDoguUpgrade) {
stage('Upgrade dogu') {
// Remove new dogu that has been built and tested above
ecoSystem.purgeDogu(doguName)

if (params.OldDoguVersionForUpgradeTest != '' && !params.OldDoguVersionForUpgradeTest.contains('v')) {
println "Installing user defined version of dogu: " + params.OldDoguVersionForUpgradeTest
ecoSystem.installDogu("testing/" + doguName + " " + params.OldDoguVersionForUpgradeTest)
} else {
println "Installing latest released version of dogu..."
ecoSystem.installDogu("testing/" + doguName)
ecoSystem.upgradeFromPreviousRelease(params.OldDoguVersionForUpgradeTest, doguName)
}

stage('Prepare integration tests - After Upgrade') {
setIntegrationTestKeys(ecoSystem)
ecoSystem.restartDogu("nginx")
}

stage('Wait for dependencies - After Upgrade') {
timeout(15) {
ecoSystem.waitForDogu("cas")
}
ecoSystem.startDogu(doguName)
ecoSystem.waitForDogu(doguName)
ecoSystem.upgradeDogu(ecoSystem)
}

// Wait for upgraded dogu to get healthy
ecoSystem.waitForDogu(doguName)
stage('Integration Tests - After Upgrade'){
// Run integration tests again to verify that the upgrade was successful
ecoSystem.runCypressIntegrationTests([cypressImage : "cypress/included:8.6.0",
enableVideo : params.EnableVideoRecording,
enableScreenshots: params.EnableScreenshotRecording])
}
}
if (gitflow.isReleaseBranch()) {
Expand All @@ -116,3 +121,11 @@ node('vagrant') {
}
}
}

void setIntegrationTestKeys(ecoSystem){
// 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\\"]' '''
}
9 changes: 6 additions & 3 deletions docs/dev/integration_tests_de.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Aufsetzen der Integrations Tests
# Aufsetzen der Integration Tests

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.
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
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"}'`

Anschließend muss noch der Key zum Entfernen bestimmter Links aus dem Warp-Menü gesetzt werden:
`etcdctl set /config/_global/disabled_warpmenu_support_entries '["myCloudogu", "aboutCloudoguToken"]'`

Danach können die Tests mit:
```bash
cd integrationTests
Expand Down
5 changes: 4 additions & 1 deletion docs/dev/integration_tests_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ 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 key to remove certain links from the warp menu must be set:
`etcdctl set /config/_global/disabled_warpmenu_support_entries '["myCloudogu", "aboutCloudoguToken"]'`.

After that the tests cann be run with:

```bash
cd integrationTests
yarn install
yarn cypress open
```
```
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-8",
"Version": "1.23.2-1",
"DisplayName": "Nginx",
"Description": "Nginx WebServer.",
"Logo": "https://cloudogu.com/images/dogus/nginx.png",
Expand Down
7 changes: 5 additions & 2 deletions integrationTests/cypress.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"baseUrl": "https://192.168.56.2",
"pageLoadTimeout": 60000,
"retries": { "runMode": 3, "openMode": 3 },
"env": {
"casPath": "/cas",
"nameOfCustomPageLinkInWarpMenu": "Privacy Policies",
"customHTMLPath": "/static/privacy_policies.html"
"customHTMLPath": "/static/privacy_policies.html",
"AdminGroup": "CesAdministrators"
},
"videoCompression": false,
"nonGlobalStepBaseDir": false,
"experimentalSessionSupport": true
}
}
2 changes: 1 addition & 1 deletion integrationTests/cypress/support/step_definitions/when.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ When(/^the user opens the always existing cas ui$/, function () {

When(/^the user requests the static custom HTML page$/, function () {
cy.request(Cypress.env('customHTMLPath'));
});
});

0 comments on commit 8ba151b

Please sign in to comment.