Skip to content

Commit

Permalink
build: exclusion des fichiers de test du war en environement de prod
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancailbourdin committed Oct 21, 2024
1 parent d8f9b41 commit 636be69
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/DEPLOY_NEXUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Dans le `gradle.properties`, renseingner les paramètres :
- `publishNexusUsername` le username pour se connecter au nexus
- `publishNexusVersion` la version sous la forme `VERSION_CAS-esco-VERSION_LOCALE`

Puis faire un simple `./gradlew publish` après avoir fait un `./gradlew clean build`.
Puis faire un simple `./gradlew publish` après avoir construit le war.

Attention à bien ajouter le profil `prod` lors de la construction du war : `./gradlew clean build -Pprofile=prod`.
8 changes: 8 additions & 0 deletions gradle/tasks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,14 @@ if (!skipValidation) {
processResources.dependsOn(validateConfiguration)
}

// Exclude files only used in the CI
processResources {
if (project.hasProperty("profile") && project.profile == "prod") {
exclude '**/application-test.yml'
exclude '**/services-test'
}
}

task duct(group: "CAS", description: "Test ticket registry functionality via the CAS REST API") {
def service = project.findProperty("duct.service") ?: "https://apereo.github.io"
def casServerNodes = providers.gradlePropertiesPrefixedBy("duct.cas").get()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cas.ticket.registry.redis.sentinel.password: GWMije5VNMe7avz
# Service registry
cas.service-registry.core.init-from-json: false
cas.service-registry.core.init-default-services: false
cas.service-registry.json.location: classpath:/services
cas.service-registry.json.location: classpath:/services-test
cas.service-registry.schedule.start-delay: 10000
cas.service-registry.schedule.repeat-interval: 120000
cas.service-registry.cache.duration: 900000
Expand Down

0 comments on commit 636be69

Please sign in to comment.