Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updatecli: automate the Ironbank bumps #5367

Merged
merged 8 commits into from
Sep 4, 2024
Merged

Conversation

v1v
Copy link
Member

@v1v v1v commented Aug 27, 2024

What does this PR do?

Enable updatecli policies to bump the Ironbank versions automatically, then #3787 won't be manually created.

Those policies can be found in https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/ (NOTE: This is a private repository only accessible by Elastic employees)

Additional changes

Why is it important?

One less thing to be worried about.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

  1. gh pr checkout 5367
  2. Install updatecli
  3. Login to ghcr.io
  4. Diff
$ updatecli compose diff --experimental

**Dry Run enabled**

"dev-tools/packaging/templates/ironbank/hardening_manifest.yaml.tmpl" updated with [dry run] content "BASE_TAG: \"9.4\""

--- dev-tools/packaging/templates/ironbank/hardening_manifest.yaml.tmpl
+++ dev-tools/packaging/templates/ironbank/hardening_manifest.yaml.tmpl
@@ -14,7 +14,7 @@
 # Build args passed to Dockerfile ARGs
 args:
   BASE_IMAGE: "redhat/ubi/ubi9"
-  BASE_TAG: "9.3"
+  BASE_TAG: "9.4"
   ELASTIC_STACK: "{{ beat_version }}"
   ELASTIC_PRODUCT: "elastic-agent"

...
⚠ deps: Bump ironbank version:
	Source:
		✔ [ubi_version] Get ubi version from https://repo1.dso.mil/dsop/redhat/ubi/9.x/ubi9
	Target:
		✔ [dockerfile_ironbank] deps(ironbank): Bump ubi version to 9.4
		⚠ [hardening_manifest_ironbank.yaml] deps(ironbank): Bump ubi version to 9.4
  1. Create Pull Request
$ GITHUB_REPOSITORY=elastic/elastic-agent \
  GITHUB_ACTOR=v1v \
  GITHUB_TOKEN=$(gh auth token) \
  updatecli compose apply --experimental
...
Existing GitHub pull request found: https://github.com/elastic/elastic-agent/pull/5423

UDASH - EXPERIMENTAL
=====================

Skipping as no Udash configuration file found at /Users/vmartinez/Library/Application Support/updatecli/udash.json

=============================

SUMMARY:

✔ deps(updatecli): bump all policies:

⚠ deps: Bump ironbank version:
	Source:
		✔ [ubi_version] Get ubi version from https://repo1.dso.mil/dsop/redhat/ubi/9.x/ubi9
	Target:
		✔ [dockerfile_ironbank] deps(ironbank): Bump ubi version to 9.4
		⚠ [hardening_manifest_ironbank.yaml] deps(ironbank): Bump ubi version to 9.4

Related issues

See elastic/apm-server#13934

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@v1v v1v added the backport-8.15 Automated backport to the 8.15 branch with mergify label Aug 27, 2024
@v1v v1v self-assigned this Aug 27, 2024
@v1v v1v added skip-changelog skip-it Skips integration tests for a PR labels Aug 27, 2024
since it was not the one used
@v1v v1v changed the title updatecli: unrequired since it's duplicated updatecli: automate the Ironbank bumps Aug 27, 2024
updatecli-compose.yaml Outdated Show resolved Hide resolved
.ci/updatecli/values.d/ironbank.yml Outdated Show resolved Hide resolved
@v1v v1v removed the skip-it Skips integration tests for a PR label Aug 28, 2024
@v1v v1v marked this pull request as ready for review August 28, 2024 15:59
@v1v v1v requested a review from a team as a code owner August 28, 2024 15:59
@v1v v1v requested a review from a team August 28, 2024 15:59
updatecli-compose.yaml Outdated Show resolved Hide resolved
.ci/updatecli/values.d/scm.yml Outdated Show resolved Hide resolved
@v1v v1v requested a review from ycombinator September 4, 2024 14:19
@v1v v1v enabled auto-merge (squash) September 4, 2024 14:19
@v1v v1v mentioned this pull request Sep 4, 2024
7 tasks
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@v1v v1v merged commit d20b0d4 into main Sep 4, 2024
9 checks passed
@v1v v1v deleted the feature/use-updatecli-policies branch September 4, 2024 17:22
mergify bot pushed a commit that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.15 Automated backport to the 8.15 branch with mergify skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants