From 9e07378e67eaf2e008b3d614b864483237b82cf3 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 14 Aug 2018 13:20:41 -0400 Subject: [PATCH] Refactor bifrost-integration-dibipa-debian jobs This allows us to remove legacy nodesets and reduce duplicate code. Change-Id: Ib04f38284a11ea5bc81b09d287a9f5918c435be9 Signed-off-by: Paul Belanger --- .../post.yaml | 15 ---- .../run.yaml | 73 ------------------- .../post.yaml | 15 ---- .../run.yaml | 73 ------------------- .../post.yaml | 2 +- zuul.d/legacy-bifrost-jobs.yaml | 19 +++-- zuul.d/project.yaml | 2 +- 7 files changed, 11 insertions(+), 188 deletions(-) delete mode 100644 playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/post.yaml delete mode 100644 playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/run.yaml delete mode 100644 playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/post.yaml delete mode 100644 playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/run.yaml diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/post.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/post.yaml deleted file mode 100644 index e07f5510a..000000000 --- a/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/post.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/run.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/run.yaml deleted file mode 100644 index d10ea1fff..000000000 --- a/playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/run.yaml +++ /dev/null @@ -1,73 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-bifrost-integration-dibipa-debian-centos-7 from old - job gate-bifrost-integration-dibipa-debian-centos-7-nv - roles: - - role: bindep - bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/bifrost'].src_dir }}" - - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - CLONEMAP=`mktemp` - REQS_DIR=`mktemp -d` - function cleanup { - mkdir -p $WORKSPACE - rm -rf $CLONEMAP $REQS_DIR - } - trap cleanup EXIT - cat > $CLONEMAP << EOF - clonemap: - - name: $ZUUL_PROJECT - dest: . - EOF - # zuul cloner works poorly if there are 2 names that are the - # same in here. - if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then - cat >> $CLONEMAP << EOF - - name: openstack/requirements - dest: $REQS_DIR - EOF - fi - /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ - git://git.openstack.org $ZUUL_PROJECT openstack/requirements - # REQS_DIR is not set for openstack/requirements and there is also - # no need to copy in this case. - if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then - cp $REQS_DIR/upper-constraints.txt ./ - fi - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -u - set -e - set -x - cd $WORKSPACE - - /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \ - git://git.openstack.org \ - openstack/bifrost \ - openstack/diskimage-builder \ - openstack/ironic \ - openstack/python-ironicclient \ - openstack-infra/shade \ - openstack/ironic-inspector \ - openstack/python-ironic-inspector-client \ - openstack/requirements - export GIT_BASE=$(pwd) - export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt - cd openstack/bifrost - scripts/test-bifrost-build-images.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/post.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/post.yaml deleted file mode 100644 index e07f5510a..000000000 --- a/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/post.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/run.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/run.yaml deleted file mode 100644 index c4d1ac7f5..000000000 --- a/playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/run.yaml +++ /dev/null @@ -1,73 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-bifrost-integration-dibipa-debian-opensuse-423 from - old job gate-bifrost-integration-dibipa-debian-opensuse-423-nv - roles: - - role: bindep - bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/bifrost'].src_dir }}" - - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - CLONEMAP=`mktemp` - REQS_DIR=`mktemp -d` - function cleanup { - mkdir -p $WORKSPACE - rm -rf $CLONEMAP $REQS_DIR - } - trap cleanup EXIT - cat > $CLONEMAP << EOF - clonemap: - - name: $ZUUL_PROJECT - dest: . - EOF - # zuul cloner works poorly if there are 2 names that are the - # same in here. - if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then - cat >> $CLONEMAP << EOF - - name: openstack/requirements - dest: $REQS_DIR - EOF - fi - /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ - git://git.openstack.org $ZUUL_PROJECT openstack/requirements - # REQS_DIR is not set for openstack/requirements and there is also - # no need to copy in this case. - if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then - cp $REQS_DIR/upper-constraints.txt ./ - fi - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -u - set -e - set -x - cd $WORKSPACE - - /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \ - git://git.openstack.org \ - openstack/bifrost \ - openstack/diskimage-builder \ - openstack/ironic \ - openstack/python-ironicclient \ - openstack-infra/shade \ - openstack/ironic-inspector \ - openstack/python-ironic-inspector-client \ - openstack/requirements - export GIT_BASE=$(pwd) - export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt - cd openstack/bifrost - scripts/test-bifrost-build-images.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian/post.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian/post.yaml index e07f5510a..502ff570c 100644 --- a/playbooks/legacy/bifrost-integration-dibipa-debian/post.yaml +++ b/playbooks/legacy/bifrost-integration-dibipa-debian/post.yaml @@ -1,4 +1,4 @@ -- hosts: primary +- hosts: all tasks: - name: Copy files from {{ ansible_user_dir }}/workspace/ on node diff --git a/zuul.d/legacy-bifrost-jobs.yaml b/zuul.d/legacy-bifrost-jobs.yaml index 64601e1a6..714c8b3a5 100644 --- a/zuul.d/legacy-bifrost-jobs.yaml +++ b/zuul.d/legacy-bifrost-jobs.yaml @@ -56,21 +56,20 @@ post-run: playbooks/legacy/bifrost-integration-dibipa-debian/post.yaml timeout: 7200 +- job: + name: bifrost-integration-dibipa-debian-ubuntu-xenial + parent: bifrost-integration-dibipa-debian + nodeset: ubuntu-xenial + - job: name: bifrost-integration-dibipa-debian-centos-7 - parent: bifrost-integration - run: playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/run.yaml - post-run: playbooks/legacy/bifrost-integration-dibipa-debian-centos-7/post.yaml - timeout: 7200 - nodeset: legacy-centos-7 + parent: bifrost-integration-dibipa-debian + nodeset: centos-7 - job: name: bifrost-integration-dibipa-debian-opensuse-423 - parent: bifrost-integration - run: playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/run.yaml - post-run: playbooks/legacy/bifrost-integration-dibipa-debian-opensuse-423/post.yaml - timeout: 7200 - nodeset: legacy-opensuse-423 + parent: bifrost-integration-dibipa-debian + nodeset: opensuse-423 - job: name: bifrost-integration-tinyipa diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 3243ac0f8..aedb045a5 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -12,7 +12,7 @@ voting: false - bifrost-integration-dibipa-debian-centos-7: voting: false - - bifrost-integration-dibipa-debian: + - bifrost-integration-dibipa-debian-ubuntu-xenial: voting: false - bifrost-integration-dibipa-debian-opensuse-423: voting: false