From 44025c0f7641e02126732fb6e72b10878bcfd98e Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 13 Sep 2023 12:26:28 +0100 Subject: [PATCH 1/8] Add renovate.json configuration Signed-off-by: thepetk --- renovate.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..71c3aa0ac --- /dev/null +++ b/renovate.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + "helpers:pinGitHubActionDigests" + ], + "enabledManagers": ["regex", "github-actions"], + "regexManagers": [ + { + "fileMatch": [ + "devfile.*y[a]?ml$" + ], + "matchStrings": [ + "image: (?\\S*):(?\\S*)" + ], + "datasourceTemplate": "docker", + "depNameTemplate": "{{{depName}}}" + } + ], + "packageRules": [ + { + "matchManagers": ["github-actions"], + "groupName": "github actions", + "groupSlug": "github-actions", + "commitMessageTopic": "{{depName}}" + } + ], + "ignorePaths": [ + "**/docker/**", + ".ci/**", + "tests/**" + ], + "prHourlyLimit": 20, + "prConcurrentLimit": 5 + } \ No newline at end of file From 45c8950667d2ef7a7dbf2831de760f088aa83474 Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 13 Sep 2023 12:53:48 +0100 Subject: [PATCH 2/8] Remove variables usagefrom stack images Signed-off-by: thepetk --- stacks/java-openliberty-gradle/devfile.yaml | 2 +- stacks/java-openliberty/devfile.yaml | 5 ++--- stacks/java-websphereliberty-gradle/devfile.yaml | 2 +- stacks/java-websphereliberty/devfile.yaml | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/stacks/java-openliberty-gradle/devfile.yaml b/stacks/java-openliberty-gradle/devfile.yaml index 542fbd591..10d97b23b 100644 --- a/stacks/java-openliberty-gradle/devfile.yaml +++ b/stacks/java-openliberty-gradle/devfile.yaml @@ -45,7 +45,7 @@ variables: components: - name: dev container: - image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}}-gradle + image: icr.io/appcafe/open-liberty-devfile-stack:22.0.0.1-gradle args: ['tail', '-f', '/dev/null'] memoryLimit: 1280Mi mountSources: true diff --git a/stacks/java-openliberty/devfile.yaml b/stacks/java-openliberty/devfile.yaml index 9651343bd..26c77559c 100644 --- a/stacks/java-openliberty/devfile.yaml +++ b/stacks/java-openliberty/devfile.yaml @@ -39,15 +39,14 @@ starterProjects: remotes: origin: https://github.com/OpenLiberty/devfile-stack-starters.git variables: - # Liberty runtime version. Minimum recommended: 21.0.0.9 - liberty-version: '22.0.0.1' liberty-plugin-version: '3.5.1' mvn-cmd: 'mvn' components: - name: dev container: + # Liberty runtime version. Minimum recommended: 21.0.0.9 # In the original upstream of this devfile, the image used is openliberty/devfile-stack:, which is built from the repository: https://github.com/OpenLiberty/devfile-stack - image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}} + image: icr.io/appcafe/open-liberty-devfile-stack:22.0.0.1 args: ['tail', '-f', '/dev/null'] memoryLimit: 768Mi mountSources: true diff --git a/stacks/java-websphereliberty-gradle/devfile.yaml b/stacks/java-websphereliberty-gradle/devfile.yaml index cd7779e26..0df37abc2 100644 --- a/stacks/java-websphereliberty-gradle/devfile.yaml +++ b/stacks/java-websphereliberty-gradle/devfile.yaml @@ -46,7 +46,7 @@ variables: components: - name: dev container: - image: icr.io/appcafe/websphere-liberty-devfile-stack:{{liberty-version}}-gradle + image: icr.io/appcafe/websphere-liberty-devfile-stack:22.0.0.1-gradle args: ['tail', '-f', '/dev/null'] memoryLimit: 1280Mi mountSources: true diff --git a/stacks/java-websphereliberty/devfile.yaml b/stacks/java-websphereliberty/devfile.yaml index fc3a17d99..c648bb127 100644 --- a/stacks/java-websphereliberty/devfile.yaml +++ b/stacks/java-websphereliberty/devfile.yaml @@ -40,15 +40,14 @@ starterProjects: remotes: origin: 'https://github.com/OpenLiberty/devfile-stack-starters.git' variables: - # Liberty runtime version. Minimum recommended: 21.0.0.9 - liberty-version: '22.0.0.1' liberty-plugin-version: '3.5.1' mvn-cmd: 'mvn' components: - name: dev container: + # Liberty runtime version. Minimum recommended: 21.0.0.9 # In the original upstream of this devfile, the image used is openliberty/devfile-stack:, which is built from the repository: https://github.com/OpenLiberty/devfile-stack - image: icr.io/appcafe/websphere-liberty-devfile-stack:{{liberty-version}} + image: icr.io/appcafe/websphere-liberty-devfile-stack:22.0.0.1 command: ['tail', '-f', '/dev/null'] memoryLimit: 768Mi mountSources: true From 1ef389c40e06daee836acb887c5ca2ade0a4f365 Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 13 Sep 2023 13:01:51 +0100 Subject: [PATCH 3/8] Update nodejs image to fixed version Signed-off-by: thepetk --- stacks/nodejs/2.1.1/devfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacks/nodejs/2.1.1/devfile.yaml b/stacks/nodejs/2.1.1/devfile.yaml index 75c4f5f31..71b241610 100644 --- a/stacks/nodejs/2.1.1/devfile.yaml +++ b/stacks/nodejs/2.1.1/devfile.yaml @@ -19,7 +19,7 @@ starterProjects: components: - name: runtime container: - image: registry.access.redhat.com/ubi8/nodejs-16:latest + image: registry.access.redhat.com/ubi8/nodejs-16:1-105.1684740145 args: ['tail', '-f', '/dev/null'] memoryLimit: 1024Mi mountSources: true From cd4a594ecd0e143af4b2e97fad7dfcbbab5d2512 Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 13 Sep 2023 13:19:49 +0100 Subject: [PATCH 4/8] Update contributing guide for renovate Signed-off-by: thepetk --- CONTRIBUTING.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 075145484..078dec259 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,14 +36,16 @@ The following are required to build the devfile index container image containing - Make sure the name matches the devfile stack's name and be in the format `-`. E.g. `java-quarkus`, `python-django`, etc. -5) Add the devfile.yaml and any other necessary files for the stack under the stack folder. +5) In case one of your components has an image, use a fixed version tag (e.g `:1.1.0`) instead of `latest`. Our renovate bot will take care of the updates to your image's tag. -6) Run the `.ci/build.sh` to build the registry into a container image. +6) Add the devfile.yaml and any other necessary files for the stack under the stack folder. + +7) Run the `.ci/build.sh` to build the registry into a container image. - This will also validate the devfiles in this repository, making sure they conform to a minimum standard. - This step will also be run in the PR build for the repository. -7) Open a pull request against this repository with a brief description of the change. +8) Open a pull request against this repository with a brief description of the change. ### Updating @@ -59,6 +61,10 @@ Updating an existing devfile stack is relatively straightforward: - Minimally, testing with odo v2 (`odo create`, `odo push`, etc) and odo v3 (`odo init`, `odo dev`, etc) is recommended, however if your Devfile is used with other tools, it's recommended to test there as well. 5) Open a pull request against this repository with your changes. +### Automatic Stack Image Update + + + ## Samples ### Contributing From 83009dac218780b5a1e10afc1f7b1ffe5cbb25cf Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 13 Sep 2023 13:51:28 +0100 Subject: [PATCH 5/8] Fix contributing section Signed-off-by: thepetk --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 078dec259..c682ba5dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ Updating an existing devfile stack is relatively straightforward: ### Automatic Stack Image Update - +As images used inside the stacks need to be up-to-date and in order to avoid using the `latest` tag, the renovate bot runs periodically ensuring that all images used from stacks (for example, inside components) have the latest version. As a result, all images used inside a devfile of a stack need to have a fixed version (e.g `1.1.0`) instead of `latest`. ## Samples From 340b99590858ff54a3df3337db5b57d6bc560fb9 Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Fri, 15 Sep 2023 13:15:02 +0100 Subject: [PATCH 6/8] Update CONTRIBUTING.md Signed-off-by: thepetk Co-authored-by: Michael Valdron Signed-off-by: thepetk --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c682ba5dc..35ae959d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ The following are required to build the devfile index container image containing - Make sure the name matches the devfile stack's name and be in the format `-`. E.g. `java-quarkus`, `python-django`, etc. -5) In case one of your components has an image, use a fixed version tag (e.g `:1.1.0`) instead of `latest`. Our renovate bot will take care of the updates to your image's tag. +5) In case one of your components has a reference to an image, use a fixed version tag (e.g `:1.1.0`) instead of `latest`. Our renovate bot will take care of the updates to the image tags. 6) Add the devfile.yaml and any other necessary files for the stack under the stack folder. From 80a2bb6f3825dc03bc992eca51dfd75e556bb491 Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 27 Sep 2023 11:33:38 +0100 Subject: [PATCH 7/8] Revert updates to liberty images Signed-off-by: thepetk --- stacks/java-openliberty-gradle/devfile.yaml | 2 +- stacks/java-openliberty/devfile.yaml | 5 +++-- stacks/java-websphereliberty-gradle/devfile.yaml | 2 +- stacks/java-websphereliberty/devfile.yaml | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/stacks/java-openliberty-gradle/devfile.yaml b/stacks/java-openliberty-gradle/devfile.yaml index 10d97b23b..542fbd591 100644 --- a/stacks/java-openliberty-gradle/devfile.yaml +++ b/stacks/java-openliberty-gradle/devfile.yaml @@ -45,7 +45,7 @@ variables: components: - name: dev container: - image: icr.io/appcafe/open-liberty-devfile-stack:22.0.0.1-gradle + image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}}-gradle args: ['tail', '-f', '/dev/null'] memoryLimit: 1280Mi mountSources: true diff --git a/stacks/java-openliberty/devfile.yaml b/stacks/java-openliberty/devfile.yaml index 26c77559c..9651343bd 100644 --- a/stacks/java-openliberty/devfile.yaml +++ b/stacks/java-openliberty/devfile.yaml @@ -39,14 +39,15 @@ starterProjects: remotes: origin: https://github.com/OpenLiberty/devfile-stack-starters.git variables: + # Liberty runtime version. Minimum recommended: 21.0.0.9 + liberty-version: '22.0.0.1' liberty-plugin-version: '3.5.1' mvn-cmd: 'mvn' components: - name: dev container: - # Liberty runtime version. Minimum recommended: 21.0.0.9 # In the original upstream of this devfile, the image used is openliberty/devfile-stack:, which is built from the repository: https://github.com/OpenLiberty/devfile-stack - image: icr.io/appcafe/open-liberty-devfile-stack:22.0.0.1 + image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}} args: ['tail', '-f', '/dev/null'] memoryLimit: 768Mi mountSources: true diff --git a/stacks/java-websphereliberty-gradle/devfile.yaml b/stacks/java-websphereliberty-gradle/devfile.yaml index 0df37abc2..cd7779e26 100644 --- a/stacks/java-websphereliberty-gradle/devfile.yaml +++ b/stacks/java-websphereliberty-gradle/devfile.yaml @@ -46,7 +46,7 @@ variables: components: - name: dev container: - image: icr.io/appcafe/websphere-liberty-devfile-stack:22.0.0.1-gradle + image: icr.io/appcafe/websphere-liberty-devfile-stack:{{liberty-version}}-gradle args: ['tail', '-f', '/dev/null'] memoryLimit: 1280Mi mountSources: true diff --git a/stacks/java-websphereliberty/devfile.yaml b/stacks/java-websphereliberty/devfile.yaml index c648bb127..fc3a17d99 100644 --- a/stacks/java-websphereliberty/devfile.yaml +++ b/stacks/java-websphereliberty/devfile.yaml @@ -40,14 +40,15 @@ starterProjects: remotes: origin: 'https://github.com/OpenLiberty/devfile-stack-starters.git' variables: + # Liberty runtime version. Minimum recommended: 21.0.0.9 + liberty-version: '22.0.0.1' liberty-plugin-version: '3.5.1' mvn-cmd: 'mvn' components: - name: dev container: - # Liberty runtime version. Minimum recommended: 21.0.0.9 # In the original upstream of this devfile, the image used is openliberty/devfile-stack:, which is built from the repository: https://github.com/OpenLiberty/devfile-stack - image: icr.io/appcafe/websphere-liberty-devfile-stack:22.0.0.1 + image: icr.io/appcafe/websphere-liberty-devfile-stack:{{liberty-version}} command: ['tail', '-f', '/dev/null'] memoryLimit: 768Mi mountSources: true From 2c939c30b44bcdf2fc4f9c8a47754e7fb60bbd87 Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 27 Sep 2023 11:34:16 +0100 Subject: [PATCH 8/8] Ignore java-openliberty and java-websphereliberty stacks Signed-off-by: thepetk --- renovate.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 71c3aa0ac..07ce27e0c 100644 --- a/renovate.json +++ b/renovate.json @@ -28,7 +28,11 @@ "ignorePaths": [ "**/docker/**", ".ci/**", - "tests/**" + "tests/**", + "stacks/java-openliberty/**", + "stacks/java-openliberty-gradle/**", + "stacks/java-websphereliberty/**", + "stacks/java-websphereliberty-gradle/**" ], "prHourlyLimit": 20, "prConcurrentLimit": 5