Skip to content
Snippets Groups Projects
Commit 54d7c8b5 authored by Te-Hung Tseng's avatar Te-Hung Tseng
Browse files

Merge branch 'opi_fix' into 'master'

added conditional to check folders with trailing slash see INFRA-5982

See merge request !10
parents e4bfa519 3deab4da
No related branches found
Tags v1.12.0
1 merge request!10added conditional to check folders with trailing slash see INFRA-5982
Pipeline #120941 passed
......@@ -24,6 +24,8 @@ provisioner:
dest: "30-Operator/10-ACC/99-PBI"
- url: https://gitlab.esss.lu.se/opis/acc/wtrc/operator.git
dest: 30-Operator/10-ACC/999-WtrC
- url: https://gitlab.esss.lu.se/opis/acc/cryo/systemexpert.git
dest: 20-SystemExpert/10-ACC/999-Cryo/
phoebus_settings:
org.phoebus.pv.ca/addr_list: 127.0.0.1
scenario:
......
......@@ -21,3 +21,7 @@
dest: 10-Engineer/10-ACC/999-TS2/99-RF
- url: https://gitlab.esss.lu.se/opis/acc/ts2/rf/systemexpert.git
dest: 20-SystemExpert/10-ACC/999-TS2/99-RF
- url: https://gitlab.esss.lu.se/opis/acc/cryo/systemexpert.git
dest: 20-SystemExpert/10-ACC/999-Cryo/
- url: https://gitlab.esss.lu.se/opis/acc/ops/operator.git
dest: 30-Operator/10-ACC/000-Ops/
......@@ -36,6 +36,7 @@ def test_opis_repositories(host):
"/data/opis-pbi/opis-pbi-systemexpert/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
"/data/opis-pbi/30-Operator/10-ACC/99-PBI/README.md",
"/data/opis-pbi/20-SystemExpert/10-ACC/999-Cryo/README.md",
):
assert host.file(filename).exists
cmd = host.run("cd /data/opis-pbi/opis-pbi-systemexpert;git rev-parse HEAD")
......@@ -46,5 +47,6 @@ def test_opis_repositories_are_deleted(host):
for filename in (
"/data/opis-pbi/20-SystemExpert/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/30-Operator/10-ACC/000-Ops/README.md",
):
assert host.file(filename).exists is False
......@@ -187,7 +187,7 @@
file:
path: "{{ item.path | dirname }}"
state: absent
when: item.path | dirname not in phoebus_git_data.results | map(attribute='invocation.module_args.dest') | list
when: (item.path | dirname not in phoebus_git_data.results | map(attribute='invocation.module_args.dest') | list) and (item.path | dirname + '/' not in phoebus_git_data.results | map(attribute='invocation.module_args.dest') | list)
loop: "{{ phoebus_opis_found_repos.files }}"
tags:
- phoebus-ess-opis
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment