Revert "Allow gitea_create_repos always_update to be list"
This reverts commit a39a939e0352741d0b2c43e96e660f52eac22245. Turns out that ansible module args don't get typed the way we expect them. This means having a Boolean or List type argument just ends up in confusion and always_update being truthy every which way. Revert until we can fix this properly. Change-Id: I596fe6883098ba636b1cad5196d1fdd76ff19076
This commit is contained in:
parent
dd03cdedc3
commit
fb1b82f3aa
@ -197,9 +197,6 @@ class Gitea(object):
|
|||||||
# https://github.com/go-gitea/gitea/pull/7493
|
# https://github.com/go-gitea/gitea/pull/7493
|
||||||
self.make_gitea_project(project)
|
self.make_gitea_project(project)
|
||||||
if create or self.always_update:
|
if create or self.always_update:
|
||||||
if isinstance(self.always_update, list
|
|
||||||
) and project not in self.always_update:
|
|
||||||
continue
|
|
||||||
futures.append(settings_thread_pool.submit(
|
futures.append(settings_thread_pool.submit(
|
||||||
self.update_gitea_project_settings,
|
self.update_gitea_project_settings,
|
||||||
project))
|
project))
|
||||||
@ -275,7 +272,7 @@ def ansible_main():
|
|||||||
url=dict(required=True),
|
url=dict(required=True),
|
||||||
password=dict(required=True, no_log=True),
|
password=dict(required=True, no_log=True),
|
||||||
projects=dict(required=True, type='list'),
|
projects=dict(required=True, type='list'),
|
||||||
always_update=dict(default=True),
|
always_update=dict(type='bool', default=True),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
# Note: Override the gitea_always_update rolevar to either true (update all) or
|
- hosts: "localhost:!disabled"
|
||||||
# a list of specific projects if you want metadata applied for these, otherwise
|
name: "sync-gitea-projects: Collect the project-config ref"
|
||||||
# the default (false) does not set any project metadata. We intentionally leave
|
strategy: free
|
||||||
# it unset here so that we can test it in the system-config-run-gitea job after
|
connection: local
|
||||||
# renaming a project, or to be able to set it from the command line.
|
tasks:
|
||||||
|
- name: Clone project-config repo
|
||||||
|
git:
|
||||||
|
repo: https://opendev.org/openstack/project-config
|
||||||
|
dest: /opt/project-config
|
||||||
|
force: yes
|
||||||
|
|
||||||
- hosts: "gitea:!disabled"
|
- hosts: "gitea:!disabled"
|
||||||
name: "Create repos on gitea servers"
|
name: "Create repos on gitea servers"
|
||||||
roles:
|
roles:
|
||||||
- role: gitea-git-repos
|
- role: gitea-git-repos
|
||||||
|
gitea_always_update: true
|
||||||
|
@ -31,33 +31,6 @@
|
|||||||
vars:
|
vars:
|
||||||
repolist: /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul/test_gitea_renames.yaml
|
repolist: /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul/test_gitea_renames.yaml
|
||||||
|
|
||||||
- hosts: "bridge.openstack.org:!disabled"
|
|
||||||
tasks:
|
|
||||||
- name: Update DIB project name in projects.yaml and switch to SB
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ project_config_src }}/gerrit/projects.yaml"
|
|
||||||
regexp: "^- project: openstack/diskimage-builder"
|
|
||||||
line: "- project: opendev/disk-image-builder\n use-storyboard: true"
|
|
||||||
|
|
||||||
- name: Run filtered sync playbook
|
|
||||||
import_playbook: sync-gitea-projects.yaml
|
|
||||||
vars:
|
|
||||||
gitea_always_update: ["opendev/disk-image-builder"]
|
|
||||||
|
|
||||||
- hosts: "gitea"
|
|
||||||
tasks:
|
|
||||||
- name: Test opendev/disk-image-builder exists in gitea
|
|
||||||
uri:
|
|
||||||
url: "https://localhost:3000/opendev/disk-image-builder"
|
|
||||||
validate_certs: false
|
|
||||||
status_code: 200
|
|
||||||
return_content: yes
|
|
||||||
register: dib_content
|
|
||||||
- name: Assert DIB issues URL was updated
|
|
||||||
fail:
|
|
||||||
msg: DIB issues URL was not updated
|
|
||||||
when: '"https://storyboard.openstack.org/#!/project/opendev/disk-image-builder" not in dib_content.content'
|
|
||||||
|
|
||||||
# This is conveniently left here so that it can be uncommented in order to
|
# This is conveniently left here so that it can be uncommented in order to
|
||||||
# autohold the system-config-run-gitea job in zuul.
|
# autohold the system-config-run-gitea job in zuul.
|
||||||
#- hosts: bridge.openstack.org
|
#- hosts: bridge.openstack.org
|
||||||
|
Loading…
x
Reference in New Issue
Block a user