Skip to content

Commit

Permalink
Add second staging server
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-boehm committed Dec 20, 2023
1 parent d50eb6b commit 631b90b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public class ArtemisConfiguration {
@Value("${artemis.staging.cleanup-enabled}")
private boolean stagingCleanup;

@Value("${artemis.staging2.url}")
private String staging2Url;

@Value("${artemis.staging2.cleanup-enabled}")
private boolean staging2Cleanup;

@Value("${artemis.production.url}")
private String productionUrl;

Expand All @@ -43,6 +49,7 @@ public String getUrl(ArtemisServer server) {
case TS1 -> test1Url;
case TS3 -> test3Url;
case STAGING -> stagingUrl;
case STAGING2 -> staging2Url;
case PRODUCTION -> productionUrl;
};
}
Expand All @@ -53,6 +60,7 @@ public boolean getCleanup(ArtemisServer server) {
case TS1 -> test1Cleanup;
case TS3 -> test3Cleanup;
case STAGING -> stagingCleanup;
case STAGING2 -> staging2Cleanup;
case PRODUCTION -> productionCleanup;
};
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/tum/cit/ase/util/ArtemisServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ public enum ArtemisServer {
TS1,
TS3,
STAGING,
STAGING2,
PRODUCTION,
}
3 changes: 3 additions & 0 deletions src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ artemis:
staging:
url: https://artemis-staging.artemis.in.tum.de/
cleanup-enabled: false
staging2:
url: https://artemis-staging-localci.artemis.cit.tum.de/
cleanup-enabled: false
production:
url: https://artemis.cit.tum.de/
cleanup-enabled: false
1 change: 1 addition & 0 deletions src/main/webapp/app/core/util/artemisServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export enum ArtemisServer {
TS1 = 'TS1',
TS3 = 'TS3',
STAGING = 'STAGING',
STAGING2 = 'STAGING2',
PRODUCTION = 'PRODUCTION',
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CreateSimulationBoxComponent implements OnInit {
instructorUsername: string = '';
instructorPassword: string = '';

availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING];
availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING, ArtemisServer.STAGING2];
availableModes = [
Mode.CREATE_COURSE_AND_EXAM,
Mode.EXISTING_COURSE_CREATE_EXAM,
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/layouts/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class NavbarComponent implements OnInit {
version = '';
account: Account | null = null;
entitiesNavbarItems: NavbarItem[] = [];
availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING];
availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING, ArtemisServer.STAGING2];

constructor(
private loginService: LoginService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h5>
class="badge"
[ngClass]="{
'bg-success': server == ArtemisServer.LOCAL,
'bg-warning text-dark': server == ArtemisServer.STAGING,
'bg-warning text-dark': server == ArtemisServer.STAGING || server == ArtemisServer.STAGING2,
'bg-danger': server == ArtemisServer.PRODUCTION,
'bg-info': server == ArtemisServer.TS1 || server == ArtemisServer.TS3
}"
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ artemis:
staging:
url:
cleanup-enabled: false
staging2:
url:
cleanup-enabled: false
production:
url:
cleanup-enabled: false

0 comments on commit 631b90b

Please sign in to comment.