Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop' into feature/integrated-code-lifecy…
Browse files Browse the repository at this point in the history
…cle/disc-space-cleanup
  • Loading branch information
Bilel Besrour committed May 8, 2024
2 parents e9298c2 + 7d7f00c commit bab9acf
Show file tree
Hide file tree
Showing 421 changed files with 15,480 additions and 8,286 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Refer to [Using JHipster in production](http://www.jhipster.tech/production) for
The following command can automate the deployment to a server. The example shows the deployment to the main Artemis test server (which runs a virtual machine):

```shell
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.0.3.war
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.0.5.war
```

## Architecture
Expand Down
41 changes: 27 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import com.diffplug.spotless.FormatterFunc
import com.diffplug.spotless.FormatterStep
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

import static com.diffplug.spotless.Formatter.NO_FILE_SENTINEL

buildscript {
repositories {
mavenLocal()
Expand All @@ -22,13 +26,13 @@ plugins {
// this allows us to find outdated dependencies via ./gradlew dependencyUpdates
id "com.github.ben-manes.versions" version "0.51.0"
id "com.github.andygoossens.modernizer" version "${modernizer_plugin_version}"
id "com.gorylenko.gradle-git-properties" version "2.4.1"
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id "org.owasp.dependencycheck" version "9.1.0"
id "com.adarshr.test-logger" version "4.0.0"
}

group = "de.tum.in.www1.artemis"
version = "7.0.3"
version = "7.0.5"
description = "Interactive Learning with Individual Feedback"

java {
Expand Down Expand Up @@ -84,13 +88,22 @@ spotless {
removeUnusedImports()
trimTrailingWhitespace()

custom 'Refuse wildcard imports', {
// Wildcard imports can't be resolved by spotless itself.
// This will require the developer themselves to adhere to best practices.
if (it =~ /\nimport .*\*;/) {
throw new AssertionError("Do not use wildcard imports. 'spotlessApply' cannot resolve this issue. The following class vioaltes this rule:\n" + it)
// Wildcard imports can't be resolved by spotless itself.
// This will require the developer themselves to adhere to best practices.
addStep(FormatterStep.createNeverUpToDate("Refuse wildcard imports", new FormatterFunc() {
@Override
String apply(String s) throws Exception {
apply(s, NO_FILE_SENTINEL)
}
}

@Override
String apply(String s, File file) throws Exception {
if (s =~ /\nimport .*\*;/) {
throw new AssertionError("Do not use wildcard imports. 'spotlessApply' cannot resolve this issue.\n" +
"The following file violates this rule: " + file.getName())
}
}
}))
}
}

Expand Down Expand Up @@ -171,13 +184,13 @@ jacocoTestCoverageVerification {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
// TODO: in the future the following value should become higher than 0.92
minimum = 0.897
minimum = 0.899
}
limit {
counter = "CLASS"
value = "MISSEDCOUNT"
// TODO: in the future the following value should become less than 10
maximum = 25
maximum = 27
}
}
}
Expand Down Expand Up @@ -291,7 +304,7 @@ dependencies {
implementation "org.apache.santuario:xmlsec:4.0.2"

implementation "org.jsoup:jsoup:1.17.2"
implementation "commons-codec:commons-codec:1.16.1" // needed for spring security saml2
implementation "commons-codec:commons-codec:1.17.0" // needed for spring security saml2

implementation "org.springdoc:springdoc-openapi-ui:1.8.0"
implementation "com.vdurmont:semver4j:3.1.0"
Expand Down Expand Up @@ -396,7 +409,7 @@ dependencies {
exclude module: "mapstruct"
}
implementation "io.springfox:springfox-bean-validators:3.0.0"
implementation "com.mysql:mysql-connector-j:8.3.0"
implementation "com.mysql:mysql-connector-j:8.4.0"
implementation "org.postgresql:postgresql:42.7.3"
implementation "com.h2database:h2:2.2.224"

Expand All @@ -413,7 +426,7 @@ dependencies {
implementation "net.lingala.zip4j:zip4j:2.11.5"
implementation "org.jgrapht:jgrapht-core:1.5.2"
// use newest version of guava to avoid security issues through outdated dependencies
implementation "com.google.guava:guava:33.1.0-jre"
implementation "com.google.guava:guava:33.2.0-jre"

// use newest version of gson to avoid security issues through outdated dependencies
implementation "com.google.code.gson:gson:2.10.1"
Expand Down Expand Up @@ -446,7 +459,7 @@ dependencies {
testImplementation "org.assertj:assertj-core:3.25.3"
testImplementation "org.mockito:mockito-core:${mockito_version}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockito_version}"
testImplementation "io.github.classgraph:classgraph:4.8.170"
testImplementation "io.github.classgraph:classgraph:4.8.171"
testImplementation "org.awaitility:awaitility:4.2.1"
testImplementation "org.apache.maven.shared:maven-invoker:3.2.0"
testImplementation "org.gradle:gradle-tooling-api:8.7"
Expand Down
2 changes: 1 addition & 1 deletion docker/artemis/config/cypress-local.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SPRING_PROFILES_ACTIVE="artemis,scheduling,localvc,localci,buildagent,core,prod,docker"

ARTEMIS_USERMANAGEMENT_USEEXTERNAL="false"
ARTEMIS_VERSIONCONTROL_URL='https://localhost'
ARTEMIS_VERSIONCONTROL_URL='http://localhost:8080'
ARTEMIS_VERSIONCONTROL_USER='demo'
ARTEMIS_VERSIONCONTROL_PASSWORD='demo'
ARTEMIS_CONTINUOUSINTEGRATION_ARTEMISAUTHENTICATIONTOKENVALUE='demo'
Expand Down
2 changes: 1 addition & 1 deletion docker/artemis/config/node1.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SPRING_PROFILES_ACTIVE='prod,localvc,localci,buildagent,core,scheduling,docker'
SPRING_PROFILES_ACTIVE='prod,localvc,localci,core,scheduling,docker'
EUREKA_INSTANCE_INSTANCEID='Artemis:1'
EUREKA_INSTANCE_HOSTNAME='artemis-app-node-1'
SPRING_HAZELCAST_INTERFACE='artemis-app-node-1'
3 changes: 3 additions & 0 deletions docker/artemis/config/node2.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ SPRING_PROFILES_ACTIVE='prod,localvc,localci,buildagent,core,docker'
EUREKA_INSTANCE_INSTANCEID='Artemis:2'
EUREKA_INSTANCE_HOSTNAME='artemis-app-node-2'
SPRING_HAZELCAST_INTERFACE='artemis-app-node-2'

ARTEMIS_VERSIONCONTROL_USER='artemis_admin'
ARTEMIS_VERSIONCONTROL_PASSWORD='artemis_admin'
5 changes: 4 additions & 1 deletion docker/artemis/config/node3.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
SPRING_PROFILES_ACTIVE='prod,localvc,localci,buildagent,core,docker'
SPRING_PROFILES_ACTIVE='prod,buildagent'
EUREKA_INSTANCE_INSTANCEID='Artemis:3'
EUREKA_INSTANCE_HOSTNAME='artemis-app-node-3'
SPRING_HAZELCAST_INTERFACE='artemis-app-node-3'

ARTEMIS_VERSIONCONTROL_USER='artemis_admin'
ARTEMIS_VERSIONCONTROL_PASSWORD='artemis_admin'
2 changes: 1 addition & 1 deletion docker/artemis/config/prod-multinode.env
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EUREKA_INSTANCE_APPNAME='Artemis'
JHIPSTER_REGISTRY_PASSWORD="admin"
JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64SECRET="bXktc2VjcmV0LWtleS13aGljaC1zaG91bGQtYmUtY2hhbmdlZC1pbi1wcm9kdWN0aW9uLWFuZC1iZS1iYXNlNjQtZW5jb2RlZAo="

ARTEMIS_VERSIONCONTROL_URL='https://localhost'
ARTEMIS_VERSIONCONTROL_URL='http://artemis-app-node-2:8080'
ARTEMIS_VERSIONCONTROL_USER='demo'
ARTEMIS_VERSIONCONTROL_PASSWORD='demo'
ARTEMIS_CONTINUOUSINTEGRATION_ARTEMISAUTHENTICATIONTOKENVALUE='demo'
Expand Down
1 change: 0 additions & 1 deletion docker/nginx/artemis-upstream-multi-node.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
server artemis-app-node-1:8080;
server artemis-app-node-2:8080;
server artemis-app-node-3:8080;
10 changes: 5 additions & 5 deletions docker/playwright-E2E-tests-mysql-localci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ services:
volumes:
- ./nginx/artemis-nginx-cypress.conf:/etc/nginx/conf.d/artemis-nginx-cypress.conf:ro
ports:
- "80:80"
- "443:443"
- '80:80'
- '443:443'
# see comments in artemis/config/cypress.env why this port is necessary
- "54321:54321"
- '54321:54321'

artemis-playwright:
extends:
Expand All @@ -46,7 +46,7 @@ services:
artemis-app:
condition: service_healthy
environment:
PLAYWRIGHT_DB_TYPE: "MySQL"
PLAYWRIGHT_DB_TYPE: 'MySQL'
command: >
sh -c '
cd /app/artemis/src/test/playwright &&
Expand All @@ -58,7 +58,7 @@ services:
networks:
artemis:
driver: "bridge"
driver: 'bridge'
name: artemis
volumes:
artemis-mysql-data:
Expand Down
10 changes: 5 additions & 5 deletions docker/playwright-E2E-tests-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ services:
volumes:
- ./nginx/artemis-nginx-cypress.conf:/etc/nginx/conf.d/artemis-nginx-cypress.conf:ro
ports:
- "80:80"
- "443:443"
- '80:80'
- '443:443'
# see comments in artemis/config/cypress.env why this port is necessary
- "54321:54321"
- '54321:54321'

artemis-playwright:
extends:
Expand All @@ -43,7 +43,7 @@ services:
artemis-app:
condition: service_healthy
environment:
PLAYWRIGHT_DB_TYPE: "MySQL"
PLAYWRIGHT_DB_TYPE: 'MySQL'
command: >
sh -c '
chmod 777 /root &&
Expand All @@ -55,7 +55,7 @@ services:
networks:
artemis:
driver: "bridge"
driver: 'bridge'
name: artemis
volumes:
artemis-mysql-data:
Expand Down
10 changes: 5 additions & 5 deletions docker/playwright-E2E-tests-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ services:
volumes:
- ./nginx/artemis-nginx-cypress.conf:/etc/nginx/conf.d/artemis-nginx-cypress.conf:ro
ports:
- "80:80"
- "443:443"
- '80:80'
- '443:443'
# see comments in artemis/config/cypress.env why this port is necessary
- "54321:54321"
- '54321:54321'

artemis-playwright:
extends:
Expand All @@ -44,7 +44,7 @@ services:
artemis-app:
condition: service_healthy
environment:
PLAYWRIGHT_DB_TYPE: "Postgres"
PLAYWRIGHT_DB_TYPE: 'Postgres'
command: >
sh -c '
chmod 777 /root &&
Expand All @@ -56,7 +56,7 @@ services:
networks:
artemis:
driver: "bridge"
driver: 'bridge'
name: artemis
volumes:
artemis-postgres-data:
Expand Down
31 changes: 16 additions & 15 deletions docker/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ services:
image: mcr.microsoft.com/playwright:v1.40.0-jammy
pull_policy: if_not_present
environment:
BASE_URL: "https://artemis-nginx"
ADMIN_USERNAME: "${bamboo_artemis_admin_username}"
ADMIN_PASSWORD: "${bamboo_artemis_admin_password}"
PLAYWRIGHT_USERNAME_TEMPLATE: "${bamboo_playwright_username_template}"
PLAYWRIGHT_PASSWORD_TEMPLATE: "${bamboo_playwright_password_template}"
ALLOW_GROUP_CUSTOMIZATION: "true"
STUDENT_GROUP_NAME: "artemis-e2etest-students"
TUTOR_GROUP_NAME: "artemis-e2etest-tutors"
EDITOR_GROUP_NAME: "artemis-e2etest-editors"
INSTRUCTOR_GROUP_NAME: "artemis-e2etest-instructors"
CREATE_USERS: "${bamboo_playwright_create_users}"
TEST_TIMEOUT_SECONDS: "${bamboo_test_timeout_seconds}"
TEST_RETRIES: "${bamboo_test_retries}"
TEST_WORKER_PROCESSES: "${bamboo_test_worker_processes}"
CI: 'true'
BASE_URL: 'https://artemis-nginx'
ADMIN_USERNAME: '${bamboo_artemis_admin_username}'
ADMIN_PASSWORD: '${bamboo_artemis_admin_password}'
PLAYWRIGHT_USERNAME_TEMPLATE: '${bamboo_playwright_username_template}'
PLAYWRIGHT_PASSWORD_TEMPLATE: '${bamboo_playwright_password_template}'
ALLOW_GROUP_CUSTOMIZATION: 'true'
STUDENT_GROUP_NAME: 'artemis-e2etest-students'
TUTOR_GROUP_NAME: 'artemis-e2etest-tutors'
EDITOR_GROUP_NAME: 'artemis-e2etest-editors'
INSTRUCTOR_GROUP_NAME: 'artemis-e2etest-instructors'
CREATE_USERS: '${bamboo_playwright_create_users}'
TEST_TIMEOUT_SECONDS: '${bamboo_test_timeout_seconds}'
TEST_RETRIES: '${bamboo_test_retries}'
TEST_WORKER_PROCESSES: '${bamboo_test_worker_processes}'
command: sh -c "cd /app/artemis/src/test/playwright && chmod 777 /root && npm ci && npm run playwright:test"
volumes:
- ..:/app/artemis
Expand All @@ -32,5 +33,5 @@ services:

networks:
artemis:
driver: "bridge"
driver: 'bridge'
name: artemis
Loading

0 comments on commit bab9acf

Please sign in to comment.