generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SUMMARY Fix charts ref on integration tests targets ISSUE TYPE Bugfix Pull Request Reviewed-by: Yuriy Novostavskiy Reviewed-by: Alina Buzachis
- Loading branch information
Showing
20 changed files
with
220 additions
and
64 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
tests/integration/targets/helm_diff/files/test-chart-deployment-time/Chart.yaml
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,6 @@ | ||
apiVersion: v2 | ||
name: test-chart-deployment-time | ||
description: A chart with a config map containing the deployment time in data | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "default" |
7 changes: 7 additions & 0 deletions
7
...s/integration/targets/helm_diff/files/test-chart-deployment-time/templates/configmap.yaml
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,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ default "ansible-configmap" .Values.myConfigmapName }} | ||
data: | ||
myValue: {{ default "test" .Values.myValue }} | ||
deploymentTime: {{ now }} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
dependencies: | ||
- remove_namespace | ||
- install_helm | ||
- setup_helm_registry |
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
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
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 @@ | ||
disabled |
5 changes: 5 additions & 0 deletions
5
tests/integration/targets/push_to_helm_registry/defaults/main.yml
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,5 @@ | ||
--- | ||
helm_binary_path: "helm" | ||
chart_repo_url: 'localhost:6035' | ||
chart_repo_username: testuser | ||
chart_repo_password: 'pass123!' |
38 changes: 38 additions & 0 deletions
38
tests/integration/targets/push_to_helm_registry/tasks/main.yml
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,38 @@ | ||
--- | ||
- name: Ensure we can log into the helm registry | ||
command: >- | ||
{{ helm_binary_path }} registry login | ||
-u {{ chart_repo_username }} | ||
-p {{ chart_repo_password }} | ||
{{ chart_repo_url }} | ||
- name: Package chart and push to helm registry | ||
block: | ||
- name: Create temporary directory to store chart | ||
ansible.builtin.tempfile: | ||
state: directory | ||
suffix: .chart | ||
register: _tmpfile | ||
|
||
- name: Package helm chart | ||
command: '{{ helm_binary_path }} package {{ chart_local_path }} --destination {{ _tmpfile.path }}' | ||
|
||
- name: Locate helm chart package | ||
ansible.builtin.find: | ||
paths: "{{ _tmpfile.path }}" | ||
patterns: '*.tgz' | ||
register: _files | ||
|
||
- name: Helm push chart to the registry | ||
command: '{{ helm_binary_path }} push {{ _files.files.0.path }} oci://{{ chart_repo_url }}/{{ chart_repo_path }}' | ||
|
||
always: | ||
- name: Logout from registry | ||
command: '{{ helm_binary_path }} registry logout {{ chart_repo_url }}' | ||
ignore_errors: true | ||
|
||
- name: Delete temporary directory | ||
ansible.builtin.file: | ||
state: absent | ||
path: '{{ _tmpfile.path }}' | ||
ignore_errors: true |
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 @@ | ||
disabled |
5 changes: 5 additions & 0 deletions
5
tests/integration/targets/setup_helm_registry/defaults/main.yml
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,5 @@ | ||
--- | ||
# user: testuser, password: pass123! | ||
registry_credentials: testuser:$2y$05$d8tw6L1hojRFW.FjHOAnIOihJWAvFb0/Pu/30hLbQNJIYzCmlyBCi | ||
registry_name: helm_registry | ||
registry_port: 6035 |
3 changes: 3 additions & 0 deletions
3
tests/integration/targets/setup_helm_registry/handlers/main.yml
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,3 @@ | ||
--- | ||
- name: Teardown registry | ||
include_tasks: teardown_registry.yml |
Oops, something went wrong.