Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create volume for /tmp #82

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Fixed
- Volume for temporary folder ([#82](https://github.com/cloudogu/scm/pull/82))

## Unreleased
### Changed
- Use Java 17 base image ([#77](https://github.com/cloudogu/scm/pull/77))
### Fixed
- [#78] Integration tests after upgrading CAS

## [2.44.2-2]
### Added
- [#72] Configuration options for resource requirements
- [#72] Defaults for CPU and memory requests
- Configuration options for store caches ([#75](https://github.com/cloudogu/scm/pull/75))
### Removed
- Default Plugins ([#70](https://github.com/cloudogu/scm/pull/70))


## [2.44.2-1]
### Changed
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM registry.cloudogu.com/official/java:11.0.14-3
FROM registry.cloudogu.com/official/java:17.0.6-2
LABEL maintainer="[email protected]"

ARG SCM_PKG_URL=https://packages.scm-manager.org/repository/releases/sonia/scm/packaging/unix/2.44.2/unix-2.44.2.tar.gz
ARG SCM_PKG_SHA256=ded6caa5635145b32111ee719c86691d2d591b6865e6f9ffc86c690f5d3dd6ca
ARG SCM_CODE_EDITOR_PLUGIN_URL=https://packages.scm-manager.org/repository/plugin-releases/sonia/scm/plugins/scm-code-editor-plugin/1.1.0/scm-code-editor-plugin-1.1.0.smp
ARG SCM_CODE_EDITOR_PLUGIN_SHA256=0029893e1878d98d7df1e513227041ce5a59980e40c81be35bcc3a1fafe0a521
ARG SCM_SCRIPT_PLUGIN_URL=https://packages.scm-manager.org/repository/plugin-releases/sonia/scm/plugins/scm-script-plugin/2.4.0/scm-script-plugin-2.4.0.smp
ARG SCM_SCRIPT_PLUGIN_SHA256=65a025ac4f002386bcf83a18123ee589333adca79a428112ac455ff92ab0489e
ARG SCM_SCRIPT_PLUGIN_URL=https://packages.scm-manager.org/repository/plugin-releases/sonia/scm/plugins/scm-script-plugin/2.5.0/scm-script-plugin-2.5.0.smp
ARG SCM_SCRIPT_PLUGIN_SHA256=4ab4abf6465b392982f5656d8898366e5310050d84bcfa400601e3c27f37fd4d
ARG SCM_CAS_PLUGIN_URL=https://packages.scm-manager.org/repository/plugin-releases/sonia/scm/plugins/scm-cas-plugin/2.4.0/scm-cas-plugin-2.4.0.smp
ARG SCM_CAS_PLUGIN_SHA256=bd9a0e0794fb1be40f357cbbde7396889055bd1af2c42b4f2cdb34763c5fb372
ARG SCM_CES_PLUGIN_URL=https://packages.scm-manager.org/repository/plugin-releases/sonia/scm/plugins/scm-ces-plugin/1.0.1/scm-ces-plugin-1.0.1.smp
Expand All @@ -26,7 +26,7 @@ ENV SCM_HOME=/var/lib/scm \
RUN set -x -o errexit -o nounset -o pipefail \
&& apk update \
&& apk upgrade \
&& apk add --no-cache graphviz ttf-dejavu mercurial jq unzip \
&& apk add --no-cache graphviz ttf-dejavu mercurial jq unzip curl \
&& curl --fail -Lks ${SCM_PKG_URL} -o /tmp/scm-server.tar.gz \
&& echo "${SCM_PKG_SHA256} */tmp/scm-server.tar.gz" | sha256sum -c - \
&& addgroup -S -g 1000 scm \
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ node('vagrant') {
}

stage('e2e Tests') {
ecoSystem.runCypressIntegrationTests([cypressImage: "cypress/included:8.6.0", enableVideo: true, enableScreenshots: true])
ecoSystem.runCypressIntegrationTests([cypressImage: "cypress/included:12.17.1", enableVideo: true, enableScreenshots: true])
}

stage('Push changes to remote repository') {
Expand Down
23 changes: 21 additions & 2 deletions dogu.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@
"Validation": {
"Type": "BINARY_MEASUREMENT"
}
},
{
"Name": "caching/stores/enabled",
"Description": "To enable store caches, set this to 'true'.",
"Optional": true,
"Default": "false"
},
{
"Name": "caching/dataFiles/size",
"Description": "To enable data file caches, set this to an integer value > 0.",
"Optional": true,
"Default": "0"
}
],
"ExposedPorts": [
Expand Down Expand Up @@ -227,15 +239,22 @@
"NeedsBackup": true
},
{
"Name": "temp",
"Name": "cache",
"Path": "/var/cache",
"Owner": "1000",
"Group": "1000",
"NeedsBackup": false
},
{
"Name": "temp",
"Path": "/tmp",
"Owner": "1000",
"Group": "1000",
"NeedsBackup": false
}
],
"HealthCheck": {
"Type": "tcp",
"Port": 8080
}
}
}
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": "scm",
"MaxLoginRetries": 3,
"AdminUsername": "ces-admin",
"AdminPassword": "ecosystem2016",
"AdminGroup": "CesAdministrators"
},
videoCompression: false,
specPattern: ["cypress/e2e/**/*.feature"],
setupNodeEvents,
},
});
13 changes: 0 additions & 13 deletions integrationTests/cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ Feature: Browser-based CAS login and logout functionality
Scenario: logged out user can log in to the dogu
Given the user is logged out of the CES
When the user opens the dogu start page
And the user types in correct login credentials
And the user clicks the login button
And the test user logs in with correct credentials
Then the user is logged in to the dogu

@requires_testuser
Scenario: logged out user can not log in to the dogu with wrong credentials
Given the user is logged out of the CES
When the user opens the dogu start page
And the user types in wrong login credentials
And the user clicks the login button
And the user logs in with wrong credentials
Then the login page informs the user about invalid credentials

@requires_testuser
Expand Down
11 changes: 0 additions & 11 deletions integrationTests/cypress/plugins/index.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const {
When, Then
} = require("@badeball/cypress-cucumber-preprocessor");

// Loads all steps from the dogu integration library into this project
const doguTestLibrary = require('@cloudogu/dogu-integration-test-library')
doguTestLibrary.registerSteps()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Then } = require("cypress-cucumber-preprocessor/steps");
const { Then } = require("@badeball/cypress-cucumber-preprocessor");

Then("the user can access the index", () => {
cy.getIndex().then((response) => {
Expand Down
10 changes: 6 additions & 4 deletions integrationTests/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"license": "MIT",
"dependencies": {
"cypress": "8.6.0",
"cypress-cucumber-preprocessor": "4.1.0",
"@cloudogu/dogu-integration-test-library": "1.0.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