Skip to content

Commit d204890

Browse files
author
mateusz.bartkowiak
committed
Merge branch 'master' into bump-consul-in-tests (#375)
2 parents c547c1a + 19d8dab commit d204890

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
restore-keys: |
4949
${{ runner.os }}-gradle-
5050
51-
- name: Test with Gradle
51+
- name: Test with Gradle (envoyVersion=${{ inputs.envoyVersion }})
5252
run: ./gradlew clean check -PenvoyVersion=${{ inputs.envoyVersion }}
5353

5454
- name: Junit report

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Lists all changes with user impact.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55

6+
## [0.19.31]
7+
8+
### Changed
9+
- move min & max envoy versions inside artifact to be accessible for dependant projects
10+
611
## [0.19.30]
712

813
### Changed

envoy-control-tests/build.gradle

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
def MIN_SUPPORTED_ENVOY_VERSION = "v1.22.7"
2-
def MAX_SUPPORTED_ENVOY_VERSION = "v1.24.0"
3-
41
dependencies {
52
implementation project(':envoy-control-runner')
63

@@ -22,19 +19,6 @@ dependencies {
2219
implementation group: 'org.testcontainers', name: 'testcontainers', version: versions.testcontainers
2320
}
2421

25-
String envoyVersion = { ->
26-
String versionArg = project.findProperty("envoyVersion") ?: "max"
27-
if (versionArg == "max") {
28-
return MAX_SUPPORTED_ENVOY_VERSION
29-
} else if (versionArg == "min") {
30-
return MIN_SUPPORTED_ENVOY_VERSION
31-
} else {
32-
return versionArg
33-
}
34-
}()
35-
36-
println("Using envoy version: $envoyVersion")
37-
3822
test {
3923
useJUnitPlatform {
4024
excludeTags 'reliability'
@@ -57,6 +41,5 @@ task reliabilityTest(type: Test) {
5741
}
5842

5943
tasks.withType(Test).configureEach {
60-
systemProperty("pl.allegro.tech.servicemesh.envoyVersion", envoyVersion)
44+
project.findProperty("envoyVersion")?.with { systemProperty("pl.allegro.tech.servicemesh.envoyVersion", it) }
6145
}
62-

envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoy/EnvoyContainer.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,17 @@ class EnvoyContainer(
3838
const val INGRESS_LISTENER_CONTAINER_PORT = 5001
3939
private const val ADMIN_PORT = 10000
4040

41+
private const val MIN_SUPPORTED_ENVOY_VERSION = "v1.22.7"
42+
private const val MAX_SUPPORTED_ENVOY_VERSION = "v1.24.0"
43+
4144
val DEFAULT_IMAGE = run {
42-
val key = "pl.allegro.tech.servicemesh.envoyVersion"
43-
val version = System.getProperty(key) ?: throw IllegalStateException("Missing '$key' system property")
45+
val version =
46+
when (val versionArg = System.getProperty("pl.allegro.tech.servicemesh.envoyVersion").orEmpty()) {
47+
"max", "" -> MAX_SUPPORTED_ENVOY_VERSION
48+
"min" -> MIN_SUPPORTED_ENVOY_VERSION
49+
else -> versionArg
50+
}
51+
logger.info("Using envoy version: $version")
4452
"envoyproxy/envoy:$version"
4553
}
4654
}

0 commit comments

Comments
 (0)