-
Notifications
You must be signed in to change notification settings - Fork 42
chore: improve the automation for the stack version bump #1351
chore: improve the automation for the stack version bump #1351
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
there are some binaries pushed, Is that correct? |
I've just tested it out locally with Console output:
Git status:
Git diff: diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile
index 39a6064..1235187 100644
--- a/.ci/Jenkinsfile
+++ b/.ci/Jenkinsfile
@@ -42,13 +42,13 @@ pipeline {
booleanParam(name: "notifyOnGreenBuilds", defaultValue: false, description: "If it's needed to notify to Slack with green builds.")
string(name: 'SLACK_CHANNEL', defaultValue: 'observablt-bots', description: 'The Slack channel(s) where errors will be posted. For multiple channels, use a comma-separated list of channels')
string(name: 'ELASTIC_AGENT_DOWNLOAD_URL', defaultValue: '', description: 'If present, it will override the download URL for the Elastic agent artifact. (I.e. https://snapshots.elastic.co/8.0.0-59098054/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz')
- string(name: 'BEAT_VERSION', defaultValue: '8.0.0-SNAPSHOT', description: 'SemVer version of the Beat to be used for the tests. You can use here the tag of your PR to test your changes')
+ string(name: 'BEAT_VERSION', defaultValue: '8.0.0-3beeb19e-SNAPSHOT', description: 'SemVer version of the Beat to be used for the tests. You can use here the tag of your PR to test your changes')
string(name: 'ELASTIC_AGENT_STALE_VERSION', defaultValue: '7.13-SNAPSHOT', description: 'SemVer version of the stale stand-alone elastic-agent to be used for Fleet upgrade tests.')
booleanParam(name: "BEATS_USE_CI_SNAPSHOTS", defaultValue: false, description: "If it's needed to use the binary snapshots produced by Beats CI instead of the official releases")
choice(name: 'LOG_LEVEL', choices: ['DEBUG', 'TRACE', 'INFO'], description: 'Log level to be used')
choice(name: 'TIMEOUT_FACTOR', choices: ['5', '3', '7', '11'], description: 'Max number of minutes for timeout backoff strategies')
string(name: 'KIBANA_VERSION', defaultValue: '', description: 'Docker tag of the kibana to be used for the tests. It will refer to an image related to a Kibana PR, under the Observability-CI namespace')
- string(name: 'STACK_VERSION', defaultValue: '8.0.0-SNAPSHOT', description: 'SemVer version of the stack to be used for the tests.')
+ string(name: 'STACK_VERSION', defaultValue: '8.0.0-3beeb19e-SNAPSHOT', description: 'SemVer version of the stack to be used for the tests.')
string(name: 'HELM_CHART_VERSION', defaultValue: '7.11.2', description: 'SemVer version of Helm chart to be used.')
string(name: 'HELM_VERSION', defaultValue: '3.5.2', description: 'SemVer version of Helm to be used.')
string(name: 'KIND_VERSION', defaultValue: '0.10.0', description: 'SemVer version of Kind to be used.')
diff --git a/.stack-version b/.stack-version
index f1358e3..8cb6912 100644
--- a/.stack-version
+++ b/.stack-version
@@ -1 +1 @@
-8.0.0-SNAPSHOT
+8.0.0-3beeb19e
diff --git a/cli/config/compose/profiles/fleet/docker-compose.yml b/cli/config/compose/profiles/fleet/docker-compose.yml
index b6e24cd..0af295c 100644
--- a/cli/config/compose/profiles/fleet/docker-compose.yml
+++ b/cli/config/compose/profiles/fleet/docker-compose.yml
@@ -16,7 +16,7 @@ services:
- xpack.security.authc.api_key.enabled=true
- ELASTIC_USERNAME=elastic
- ELASTIC_PASSWORD=changeme
- image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-8.0.0-a6334483-SNAPSHOT}"
+ image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-8.0.0-3beeb19e-SNAPSHOT}"
platform: ${stackPlatform:-linux/amd64}
ports:
- "9200:9200"
@@ -28,7 +28,7 @@ services:
test: "curl -f http://localhost:5601/login | grep kbn-injected-metadata 2>&1 >/dev/null"
retries: 600
interval: 1s
- image: "docker.elastic.co/${kibanaDockerNamespace:-kibana}/kibana:${kibanaVersion:-8.0.0-a6334483-SNAPSHOT}"
+ image: "docker.elastic.co/${kibanaDockerNamespace:-kibana}/kibana:${kibanaVersion:-8.0.0-3beeb19e-SNAPSHOT}"
platform: ${stackPlatform:-linux/amd64}
ports:
- "5601:5601"
@@ -48,7 +48,7 @@ services:
- "XPACK_FLEET_AGENTS_FLEET_SERVER_HOSTS=[\"http://fleet-server:8220\"]"
- "XPACK_FLEET_AGENTS_TLSCHECKDISABLED=true"
fleet-server:
- image: "docker.elastic.co/beats/elastic-agent:${stackVersion:-8.0.0-a6334483-SNAPSHOT}"
+ image: "docker.elastic.co/beats/elastic-agent:${stackVersion:-8.0.0-3beeb19e-SNAPSHOT}"
depends_on:
elasticsearch:
condition: service_healthy
diff --git a/cli/config/compose/profiles/metricbeat/docker-compose.yml b/cli/config/compose/profiles/metricbeat/docker-compose.yml
index cfb9afe..e87a416 100644
--- a/cli/config/compose/profiles/metricbeat/docker-compose.yml
+++ b/cli/config/compose/profiles/metricbeat/docker-compose.yml
@@ -9,7 +9,7 @@ services:
- xpack.monitoring.collection.enabled=true
- ELASTIC_USERNAME=elastic
- ELASTIC_PASSWORD=changeme
- image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-8.0.0-a6334483-SNAPSHOT}"
+ image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-8.0.0-3beeb19e-SNAPSHOT}"
platform: ${stackPlatform:-linux/amd64}
ports:
- "9200:9200"
diff --git a/cli/config/kubernetes/base/elasticsearch/deployment.yaml b/cli/config/kubernetes/base/elasticsearch/deployment.yaml
index 98b60f5..6b47cf2 100644
--- a/cli/config/kubernetes/base/elasticsearch/deployment.yaml
+++ b/cli/config/kubernetes/base/elasticsearch/deployment.yaml
@@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: elasticsearch
- image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-a6334483-SNAPSHOT
+ image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-3beeb19e-SNAPSHOT
envFrom:
- configMapRef:
name: elasticsearch-config
diff --git a/cli/config/kubernetes/base/fleet-server/deployment.yaml b/cli/config/kubernetes/base/fleet-server/deployment.yaml
index f77d7d6..45ff9d9 100644
--- a/cli/config/kubernetes/base/fleet-server/deployment.yaml
+++ b/cli/config/kubernetes/base/fleet-server/deployment.yaml
@@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: fleet-server
- image: docker.elastic.co/beats/elastic-agent:8.0.0-a6334483-SNAPSHOT
+ image: docker.elastic.co/beats/elastic-agent:8.0.0-3beeb19e-SNAPSHOT
env:
- name: FLEET_SERVER_ENABLE
value: "1"
diff --git a/cli/config/kubernetes/base/kibana/deployment.yaml b/cli/config/kubernetes/base/kibana/deployment.yaml
index c59fc46..d0daffc 100644
--- a/cli/config/kubernetes/base/kibana/deployment.yaml
+++ b/cli/config/kubernetes/base/kibana/deployment.yaml
@@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: kibana
- image: docker.elastic.co/kibana/kibana:8.0.0-a6334483-SNAPSHOT
+ image: docker.elastic.co/kibana/kibana:8.0.0-3beeb19e-SNAPSHOT
env:
- name: ELASTICSEARCH_URL
value: http://elasticsearch:9200
diff --git a/internal/common/defaults.go b/internal/common/defaults.go
index ef1d84f..6947dbc 100644
--- a/internal/common/defaults.go
+++ b/internal/common/defaults.go
@@ -40,7 +40,7 @@ const FleetServerAgentServiceName = "fleet-server"
var AgentStaleVersion = "7.13-SNAPSHOT"
// BeatVersionBase is the base version of the Beat to use
-var BeatVersionBase = "8.0.0-SNAPSHOT"
+var BeatVersionBase = "8.0.0-3beeb19e-SNAPSHOT"
// BeatVersion is the version of the Beat to use
// It can be overriden by BEAT_VERSION env var
|
Ahh good catch! I found that the .stack-version file is wrong! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, there is only a couple of questions regarding the find, since I only see one file
There is only one file to modify
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify (cherry picked from commit 395bdb2) # Conflicts: # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify (cherry picked from commit 395bdb2) # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify (cherry picked from commit 395bdb2) # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* feat: automated update Beats' base version * chore: reduce number of version occurrences in tests * chore: decouple unit tests from the current version * feat: update Jenkinsfile * feat: automate .stack-version * fix: append snapshot * chore: simplify finding single files There is only one file to modify # Conflicts: # .ci/bump-stack-version.sh # internal/_testresources/gcp/commits.json # internal/_testresources/gcp/snapshots.json # internal/utils/utils_test.go
* master: chore: read elastic-agent logs using native OS' log manager (elastic#1368) Add kubernetes autodiscover scenario without autodiscover (elastic#1361) fix: expose fleet-server port (elastic#1348) chore: improve the automation for the stack version bump (elastic#1351) bump stack version 8.0.0-a6334483 (elastic#1350) bump stack version 8.0.0-1e9bea0f (elastic#1346) chore(ci): be more specific about the underlying ARM OS (elastic#1341) fix: apply container name to elastic-agent Docker services (elastic#1336)
What does this PR do?
This PR does a few things:
Why is it important?
Automate for the Win!
The change in the unit tests is important for the sake of maintainability: whenever a new version branch is created, we have to bump the tests files affected in this PR. For that reason, after backporting (and resolving conflicts in) this PR, the tests will be agnostic to the version branch where they live.
Checklist
make unit-test
), and they are passing locallymake notice
in the proper directory)Author's Checklist
How to test this PR locally
Run the automated bump with a fake bump:
.ci/bump-stack-version.sh FOO
The created branch will contain a commit affecting versions files, Jenkinsfile and compose files.