Skip to content
Snippets Groups Projects
Unverified Commit e90cae93 authored by Max Gautier's avatar Max Gautier Committed by GitHub
Browse files

Refactor check_galaxy + fix version (#10729)

* Remove checks for docs using exact tags

Instead use a more generic documentation for installing kubespray as a
collection from git.

* Check that we upgraded galaxy.yml to next version

This is only intented to check for human error. The version in galaxy
should be the next (which does not mean the same if we're on master or a
release branch).

* Set collection version to KUBESPRAY_NEXT_VERSION
parent bb67d952
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ Kubespray can be installed as an [Ansible collection](https://docs.ansible.com/a ...@@ -15,7 +15,7 @@ Kubespray can be installed as an [Ansible collection](https://docs.ansible.com/a
collections: collections:
- name: https://github.com/kubernetes-sigs/kubespray - name: https://github.com/kubernetes-sigs/kubespray
type: git type: git
version: v2.23.1 version: master # use the appropriate tag or branch for the version you need
``` ```
2. Install your collection 2. Install your collection
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
namespace: kubernetes_sigs namespace: kubernetes_sigs
description: Deploy a production ready Kubernetes cluster description: Deploy a production ready Kubernetes cluster
name: kubespray name: kubespray
version: 2.23.1 version: 2.24.0
readme: README.md readme: README.md
authors: authors:
- luksi1 - luksi1
......
...@@ -2,17 +2,11 @@ ...@@ -2,17 +2,11 @@
set -e set -e
version_from_galaxy=$(grep "^version:" galaxy.yml | awk '{print $2}') version_from_galaxy=$(grep "^version:" galaxy.yml | awk '{print $2}')
version_from_docs=$(grep -P "^\s+version:\sv\d+\.\d+\.\d+" docs/ansible_collection.md | awk '{print $2}')
if [[ $KUBESPRAY_VERSION != "v${version_from_galaxy}" ]] # TODO: compute the next expected version somehow
if [[ $KUBESPRAY_VERSION == "v${version_from_galaxy}" ]]
then then
echo "Please update galaxy.yml version to match the KUBESPRAY_VERSION. Be sure to remove the \"v\" to adhere" echo "Please update galaxy.yml version to match the next KUBESPRAY_VERSION."
echo "to semenatic versioning" echo "Be sure to remove the \"v\" to adhere to semantic versioning"
exit 1
fi
if [[ $KUBESPRAY_VERSION != "${version_from_docs}" ]]
then
echo "Please update the documentation for Ansible collections under docs/ansible_collection.md to reflect the KUBESPRAY_VERSION"
exit 1 exit 1
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment