Skip to content

Commit

Permalink
Allow the user to choose astartectl version
Browse files Browse the repository at this point in the history
Allow for more customization when using this action.
Default to astartectl 24.5.2.
Also, fix outdated README.md info.

Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
  • Loading branch information
Annopaolo committed Sep 20, 2024
1 parent 64137a6 commit 57468af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ For more information, reference the GitHub Help Documentation for [Creating a wo

### Inputs

- `astarte_chart_version`: The Helm chart version for Astarte Operator. Defaults to the last one in the 23.5.xx series.
- `astarte_version`: The Astarte version to install. Defaults to `1.1.1`.
- `astarte_chart_version`: The Helm chart version for Astarte Operator. Defaults to the last one in the 24.5.xx series.
- `astartectl_version`: The astartectl CLI version to install. Defaults to the last one in the 24.5.xx series. Advised to leave as default.
- `astarte_version`: The Astarte version to install. Defaults to the last one in the 1.2.xx series.
- `astarte_realm`: The Astarte Realm that will be created with the cluster. Defaults to `test`.
- `astarte_namespace`: The Kubernetes namespace where Astarte will be installed. Defaults to `astarte`.
- `kind_version`: The kind version to use (default: `v0.22.0`). Advised to leave as default.
- `kind_version`: The kind version to use (default: `v0.23.0`). Advised to leave as default.
- `kind_node_image`: The Docker image for the cluster nodes. Advised to leave as default.

### Outputs
Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ inputs:
description: "The Astarte Operator Helm Chart version to use. Defaults to ^24.5.0"
required: false
default: "^24.5.0"
astartectl_version:
description: "The astartectl CLI version to use. Defaults to ^24.5.1"
required: false
default: "24.5.2"
astarte_version:
description: "The Astarte version to install. Defaults to 1.2.0"
description: "The Astarte version to install. Defaults to ^1.2.0"
required: false
default: "1.2.0"
astarte_realm:
Expand Down Expand Up @@ -78,7 +82,7 @@ runs:
run: ${{ github.action_path }}/setup-ssl.sh "${{ github.action_path }}/ca.json" "${{ github.action_path }}/cert.json" "${{ inputs.astarte_namespace }}"
- name: Setup Astarte
shell: bash
run: ${{ github.action_path }}/setup-astarte.sh "${{ inputs.astarte_version }}" "${{ inputs.astarte_namespace }}" "${{ github.action_path }}/adi.yml" "${{ github.action_path }}/broker-service.yml" "${{ github.action_path }}/astarte.yaml"
run: ${{ github.action_path }}/setup-astarte.sh "${{ inputs.astarte_version }}" "${{ inputs.astarte_namespace }}" "${{ github.action_path }}/adi.yml" "${{ github.action_path }}/broker-service.yml" "${{ github.action_path }}/astarte.yaml" "${{ inputs.astartectl_version }}"
- name: Create Realm Keys
shell: bash
run: cd "${{ github.action_path }}" && astartectl utils gen-keypair "${{ inputs.astarte_realm }}" && cd -
Expand Down
5 changes: 3 additions & 2 deletions setup-astarte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
cd $tmp_dir
wget -q https://github.com/astarte-platform/astartectl/releases/download/v24.5.2/astartectl_24.5.2_linux_x86_64.tar.gz
tar xf astartectl_24.5.2_linux_x86_64.tar.gz
ASTARTECTL_VERSION=$6
wget -q https://github.com/astarte-platform/astartectl/releases/download/v${ASTARTECTL_VERSION}/astartectl_${ASTARTECTL_VERSION}_linux_x86_64.tar.gz
tar xf astartectl_${ASTARTECTL_VERSION}_linux_x86_64.tar.gz
chmod +x astartectl
cd -

Expand Down

0 comments on commit 57468af

Please sign in to comment.