github updatecli/updatecli v0.31.0

latest releases: v0.86.1, v0.86.0, v0.86.0-rc.1...
2 years ago

Changes

INFO: This release can be enabled by using the flag --experimental. We decided to use the experimental to highlight that we are currently in a very early stage, and this feature will be modified based on user input.

🚀 Features

  • Introduce Autodiscovery with Helm Chart & Rancher Fleet support @olblak (#763)

Contributors

@olblak, @updateclibot and @updateclibot[bot]


The autodiscovery feature is a major feature that land the paving for a new way of using Updatecli

It introduces the following changes:

Fix Jsonschema Data
Due to a regression, the jsonschema expected Updatecli to start with a spec root key. This is fix now

Default config

By default, updatecli will look for pipeline manifest in updatecli.yaml or updatecli.d.
It doesn't return an error if no valid manifest could be found. This behavior change is important for the autodiscovery
as the autodiscovery can be used without providing manifest such as updatecli manifest show --local-autodiscovery

Manifest show

In version 0.27.0, we introduce sub-commands for manifest such as updatecli manifest upgrade
Now we are adding a new one updatecli manifest show which deprecates updatecli show
This subcommand is convenient to display and generate manifest based on the autodiscovery such as updatecli manifest show --local-autodiscovery

No manifest allowed

As mentioned in the previous section, Updatecli can analyze local files to generate and apply manifest.
This means that providing a valid manifest is no anymore mandatory for Updatecli
The following commands work

  • updatecli diff --local-autodiscovery
  • updatecli apply --local-autodiscovery
  • updatecli show --local-autodiscovery
  • updatecli manifest show --local-autodiscovery

Drop target in pullrequest spec

In the past, the pullrequest spec would rely on the field "targets" to know which target was bound to the pullrequest
This information could easily be generated from the context.

before

pullrequests:
  default:
    title: '[updatecli] Bump updatecli version to {{ source "latestVersion" }}'
    kind: github
    scmid: default
    targets:
      - bugReport
    spec:
      labels:
        - chore
        - skip-changelog

After

pullrequests:
  default:
    title: '[updatecli] Bump updatecli version to {{ source "latestVersion" }}'
    kind: github
    scmid: default
    spec:
      labels:
        - chore
        - skip-changelog

You can easily fix your manifest by running updatecli manifest upgrade --config ./updatecli.d to validate the changes and then
updatecli manifest upgrade --config <manifest name>.yaml --in-place

autodiscovery

INFO: Autodiscovery can be enabled by using the flag --experimental. We decided to use the experimental to highlight that we are currently in a very early stage, and this feature can easily be modified based on user input.

The goal of this feature is to parse common files to try to generate and apply manifest. The goal is to reduce the need of writing and maintaining manifest that could easily be generated based on context.
while it works out of the box without manifest, It can also be configured from the same manifest by using the top-level key autodiscovery

More information is available on www.updatecli.io/docs/core/autodiscovery

Helm crawler

The first autodiscovery crawler named "helm", allows parsing common Helm chart configuration to update the following information.

  • Helm dependencies defined in Chart.yaml
  • Container images defined in values.yaml using the following format

Docker image identified from Helm Charts values, are looking for following structure:

image:
  repository: <image_name>
  tag: <tag>
images:
  <id>:
    repository: <image_name>
    tag: <image_tag>
title: Manifest title
scms
  # As before, it specifies scm configuration
pullrequests:
  # As before, it specifies pullrequest configuration
autodiscovery:
  # Optional
  # If one is specified, the updatecli analyzes the scm directory, instead of the local one
  scmid: <it references a scm configuration >

  # Optional
  pullrequest: <specifis a pullrequest id>

  # Override default crawlers configuration
  crawlers:
    helm:
      # Default true
      enabled: true

      # Optional
      ignore:
        - path: <specifies path to ignore>

      # Optional
      only:
        - path: <only explore this path>

      # OptionDefault scm directory or local if nothing specified
      rootdir: <override directory to analyze>

      # Auths specifies docker registry credentials
      auths:
          docker.io:
              username: <username>
              token: <token>
          ghcr.io:
              username: <username>
              token: <token>

Fleet Crawler

A second crawler has been added to help to put things in perspective, it updates helm version from fleet.yaml files

An example of autodiscovery manifest would be

title: Manifest title
scms
  # As before, it specifies scm configuration
pullrequests:
  # As before, it specifies pullrequest configuration
autodiscovery:
  # Optional
  # If one is specified, the updatecli analyzes the scm directory, instead of the local one
  scmid: <it references a scm configuration >

  # Optional
  pullrequest: <specifis a pullrequest id>

  # Override default crawlers configuration
  crawlers:
    rancher/fleet:
      # default true
      enabled: true

      # Optional
      ignore:
        - path: <specifies path to ignore>

      # Optional
      only:
        - path: <only explore this path>

      # OptionDefault scm directory or local if nothing specified
      rootdir: <override directory to analyze>

Don't miss a new updatecli release

NewReleases is sending notifications on new releases.