rancher / image-build-flannel

Apache License 2.0
2 stars 20 forks source link

Add Updatecli #29

Closed matttrach closed 1 year ago

matttrach commented 1 year ago

This introduces updatecli to the repo with a simple validation test. This contributes to https://github.com/rancher/rke2/issues/4130.

I tested this by changing the owner and branch in the updatecli config to mine:

updatecli diff -v updatecli/values.yaml -c updatecli/updatecli.d/updatecli.yml

+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline "updatecli/updatecli.d/updatecli.yml"

SCM repository retrieved: 2

++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++

++++++++++++
+ PIPELINE +
++++++++++++

################################################################
# INTRODUCE UPDATECLI TO REPO AND VALIDATE BASIC FUNCTIONALITY #
################################################################

SOURCES
=======

goTag
-----
Searching for version matching pattern "^go1\\.20\\.2$"
✔ Git tag "go1.20.2" found matching pattern "^go1\\.20\\.2$"

CONDITIONS:
===========

testVersionShouldMatchGoTag
---------------------------
✗ Key "version", in YAML file "updatecli/validate.yml", is incorrectly set to go1.20.1 and should be "go1.20.2"

TARGETS
========

updateValidateFile
------------------

**Dry Run enabled**

⚠ Key 'version', from file '/tmp/updatecli/github/matttrach/image-build-flannel/updatecli/validate.yml', was updated from 'go1.20.1' to 'go1.20.2'

ACTIONS
========

[Dry Run] An action of kind "github/pullrequest" is expected.

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

REPORTS:

⚠ Introduce updatecli to repo and validate basic functionality:
        Source:
                ✔ [goTag] Get Go 1.20.2 tag (kind: gittag)
        Condition:
                ✔ [testVersionShouldMatchGoTag]  (kind: yaml)
        Target:
                ⚠ [updateValidateFile] Update the version in the validate file (kind: yaml)

Run Summary
===========
Pipeline(s) run:
  * Changed:    1
  * Failed:     0
  * Skipped:    0
  * Succeeded:  0
  * Total:      1