forked from rancher/rke2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove updatecli default steps and add vsphere charts
Signed-off-by: galal-hussein <[email protected]>
- Loading branch information
1 parent
f754485
commit b399130
Showing
5 changed files
with
147 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
info() | ||
{ | ||
echo '[INFO] ' "$@" | ||
} | ||
warn() | ||
{ | ||
echo '[WARN] ' "$@" >&2 | ||
} | ||
fatal() | ||
{ | ||
echo '[ERROR] ' "$@" >&2 | ||
exit 1 | ||
} | ||
|
||
|
||
CHART_VERSIONS_FILE="charts/chart_versions.yaml" | ||
|
||
|
||
CHART_NAME=${1} | ||
CHART_VERSION=${2} | ||
|
||
CURRENT_VERSION=$(yq -r '.charts[] | select(.filename == "/charts/'"${1}"'.yaml") | .version' ${CHART_VERSIONS_FILE}) | ||
if [ "${CURRENT_VERSION}" != "${CHART_VERSION}" ]; then | ||
info "chart ${CHART_NAME} should be updated from version ${CURRENT_VERSION} to ${CHART_VERSION}" | ||
exit 0 | ||
fi | ||
fatal "chart ${CHART_NAME} has the latest version" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This small test makes sure that updatecli is working properly on a repo. | ||
# To test this: | ||
# have "UPDATECLI_GITHUB_ACTOR" env set to your github username | ||
# have "UPDATECLI_GITHUB_TOKEN" env set to your github token | ||
# have the latest version of updatecli installed | ||
# 'updatecli diff -v updatecli/values.yaml -c updatecli/updatecli.d/vsphere-cpi.yml' | ||
# In the future, more useful files should be added to this directory. | ||
--- | ||
name: "Update vsphere csi/cpi charts and images" | ||
# Make sure we can pull in github repos from multiple orgs | ||
scms: | ||
rke2: | ||
kind: "github" | ||
spec: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
username: "{{ requiredEnv .github.username }}" | ||
token: '{{ requiredEnv .github.token }}' | ||
owner: rancher | ||
repository: rke2 | ||
branch: master | ||
|
||
sources: | ||
vsphere-cpi: | ||
name: "Get vsphere-cpi chart version" | ||
kind: "helmchart" | ||
spec: | ||
url: https://rancher.github.io/rke2-charts | ||
name: rancher-vsphere-cpi | ||
versionfilter: | ||
kind: "latest" | ||
|
||
conditions: | ||
vsphereCPIVersionShouldBeUpdated: | ||
name: "Check if vsphere-cpi chart should be updated or not" | ||
kind: shell | ||
sourceid: vsphere-cpi | ||
spec: | ||
command: bash ./updatecli/scripts/validate_version.sh rancher-vsphere-cpi | ||
|
||
targets: | ||
updateVsphereCPI: | ||
name: "Update the vsphere-cpi airgap images" | ||
kind: "shell" | ||
scmid: "rke2" | ||
sourceid: vsphere-cpi | ||
spec: | ||
command: bash ./updatecli/scripts/update_chart_and_images.sh rancher-vsphere-cpi | ||
|
||
actions: | ||
github: | ||
kind: "github/pullrequest" | ||
scmid: "rke2" | ||
spec: | ||
automerge: false | ||
draft: false | ||
mergemethod: squash | ||
parent: false | ||
title: "Update vsphere-cpi chart" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This small test makes sure that updatecli is working properly on a repo. | ||
# To test this: | ||
# have "UPDATECLI_GITHUB_ACTOR" env set to your github username | ||
# have "UPDATECLI_GITHUB_TOKEN" env set to your github token | ||
# have the latest version of updatecli installed | ||
# 'updatecli diff -v updatecli/values.yaml -c updatecli/updatecli.d/vsphere-csi.yml' | ||
# In the future, more useful files should be added to this directory. | ||
--- | ||
name: "Update vsphere csi/cpi charts and images" | ||
# Make sure we can pull in github repos from multiple orgs | ||
scms: | ||
rke2: | ||
kind: "github" | ||
spec: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
username: "{{ requiredEnv .github.username }}" | ||
token: '{{ requiredEnv .github.token }}' | ||
owner: rancher | ||
repository: rke2 | ||
branch: master | ||
|
||
sources: | ||
vsphere-csi: | ||
name: "Get vsphere-csi chart version" | ||
kind: "helmchart" | ||
spec: | ||
url: https://rancher.github.io/rke2-charts | ||
name: rancher-vsphere-csi | ||
versionfilter: | ||
kind: "latest" | ||
|
||
conditions: | ||
vsphereCSIVersionShouldBeUpdated: | ||
name: "Check if vsphere-csi chart should be updated or not" | ||
kind: shell | ||
sourceid: vsphere-csi | ||
spec: | ||
command: bash ./updatecli/scripts/validate_version.sh rancher-vsphere-csi | ||
|
||
targets: | ||
updateVsphereCSI: | ||
name: "Update the vsphere-csi airgap images" | ||
kind: "shell" | ||
scmid: "rke2" | ||
sourceid: vsphere-csi | ||
spec: | ||
command: bash ./updatecli/scripts/update_chart_and_images.sh rancher-vsphere-csi | ||
|
||
actions: | ||
github: | ||
kind: "github/pullrequest" | ||
scmid: "rke2" | ||
spec: | ||
automerge: false | ||
draft: false | ||
mergemethod: squash | ||
parent: false | ||
title: "Update vsphere-csi chart" |
This file was deleted.
Oops, something went wrong.