Skip to content

Commit 9d86eb1

Browse files
fix molecule test
Signed-off-by: varshaprasad96 <varshaprasad96@gmail.com>
1 parent 8bf53fb commit 9d86eb1

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
(ansible/v1) Bumped Kuztomize version in ansible project scaffolding to 3.8.7.
6+
7+
# kind is one of:
8+
# - addition
9+
# - change
10+
# - deprecation
11+
# - removal
12+
# - bugfix
13+
kind: "change"
14+
15+
# Is this a breaking change?
16+
breaking: true
17+
18+
# NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
19+
# FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
20+
#
21+
# The generator auto-detects the PR number from the commit
22+
# message in which this file was originally added.
23+
#
24+
# What is the pull request number (without the "#")?
25+
# pull_request_override: 0
26+
27+
28+
# Migration can be defined to automatically add a section to
29+
# the migration guide. This is required for breaking changes.
30+
migration:
31+
header: (ansible/v1) Bump Kuztomize version in helm project scaffolding to 3.8.7
32+
body: >
33+
Ansible projects are now scaffolded with `Kuztomize` version `3.8.7`. This version of kustomize
34+
requires that the path to patch file be provided with the `--path` flag in `add patch` command.
35+
In `molecule/default/prepare.yml` file, update the command under `Set pull policy`, to be:
36+
```diff
37+
- name: Set pull policy
38+
- command: '{{ "{{ kustomize }}" }} edit add patch pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml'
39+
+ command: '{{ "{{ kustomize }}" }} edit add patch --path pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml'
40+
```
41+

internal/cmd/ansible-operator/run/cmd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ func run(cmd *cobra.Command, f *flags.Flags) {
106106
}
107107

108108
if err := verifyCfgURL(cfg.Host); err != nil {
109-
log.Error(err, "Failed toverify config endpoint")
110109
os.Exit(1)
111110
}
112111

internal/plugins/ansible/v1/scaffolds/internal/templates/molecule/mdefault/prepare.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const prepareTemplate = `---
5656
chdir: '{{ "{{ config_dir }}" }}/testing'
5757
5858
- name: Set pull policy
59-
command: '{{ "{{ kustomize }}" }} edit add patch pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml'
59+
command: '{{ "{{ kustomize }}" }} edit add patch --path pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml'
6060
args:
6161
chdir: '{{ "{{ config_dir }}" }}/testing'
6262

testdata/ansible/memcached-operator/molecule/default/prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
chdir: '{{ config_dir }}/testing'
1919

2020
- name: Set pull policy
21-
command: '{{ kustomize }} edit add patch pull_policy/{{ operator_pull_policy }}.yaml'
21+
command: '{{ kustomize }} edit add patch --path pull_policy/{{ operator_pull_policy }}.yaml'
2222
args:
2323
chdir: '{{ config_dir }}/testing'
2424

0 commit comments

Comments
 (0)