Remove unused/broken jobs
Remove obsolete jobs that contain Zuul syntax errors or invalid nodeset references. This change is required to prevent Zuul validation gates from failing on this repository. * job.stx-obs-build-opensuse : removed because it references a nodeset that no longer exists, opensuse-15 * job.stx-obs-build-centos : removed because it references a nodeset that no longer exist, centos-7 * project-template.stx-build-rpms : removed because it simply executes the above (removed) jobs * job.stx-tox-bandit-static-scan : removed a (negative) exclusion regex for the file tools/bandit.yml Reason: current version of Zuul doesn't support "negative lookahead" assertions (?!pattern) [1] . Consequence: before this patch the job would run for code reviews that modified tools/bandit.yaml, but would be skipped for any other file in tools/ . After this patch: the job would always run for any changes in tools/ . I confirmed that the removed elements are not referenced anywhere in starlingx by using a code search feature of [2], for all repos in starlingx/ namespace. [1] https://github.com/google/re2/wiki/Syntax [2] https://opendev.org/starlingx/-/code?fuzzy=false Story: 2011326 Task: 51554 Change-Id: Ied22d83c1da08755690fa8389d1dae6847a58da2 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> (cherry picked from commit 0cddfe7435e6b7b9c8e4a8df5943c6e79208f46e)
This commit is contained in:
parent
d4e9073e17
commit
9dc6aae46d
@ -1,217 +0,0 @@
|
||||
- hosts: all
|
||||
vars:
|
||||
project_ver: 1.0
|
||||
src_project: "Cloud:StarlingX:2.0"
|
||||
target_project: "home:saulwold:sandbox-{{ target_distro }}"
|
||||
test_project: "{{ target_project }}-{{ project_ver }}"
|
||||
stx_project_desc: ""
|
||||
stx_url: ""
|
||||
osc_user: "saulwold"
|
||||
osc_register: osc_result
|
||||
obs_projects: []
|
||||
spec_dirs: []
|
||||
sorted_dirs: []
|
||||
osc_key_key: "@ub@FB7OZxs391wt"
|
||||
tasks:
|
||||
- name: Print OS Family
|
||||
debug:
|
||||
msg: "OS distribution: {{ ansible_distribution }}"
|
||||
|
||||
- name: Setup local distro flag CentOS
|
||||
set_fact:
|
||||
target_distro: centos
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
- name: Setup local distro flag openSUSE
|
||||
set_fact:
|
||||
target_distro: opensuse
|
||||
when: ansible_distribution == "openSUSE Leap"
|
||||
|
||||
- name: Setup local directories when not using zuul
|
||||
set_fact:
|
||||
top_dir: /test
|
||||
src_dir: /test
|
||||
when: zuul is not defined
|
||||
|
||||
- name: Setup local directories from zuul data
|
||||
set_fact:
|
||||
top_dir: "{{ zuul.executor.src_root }}"
|
||||
src_dir: "{{ zuul.project.src_dir }}"
|
||||
when: zuul is defined
|
||||
|
||||
- name: Print OS Family
|
||||
debug:
|
||||
msg: "OS distribution: {{ ansible_distribution }} {{ target_distro }}"
|
||||
|
||||
- name: Get OSC Command
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: install_osc
|
||||
|
||||
- name: Create temporary directory
|
||||
tempfile:
|
||||
state: directory
|
||||
prefix: stx.
|
||||
register: stx_pkg_tmpdir
|
||||
|
||||
- name: Setup oscrc file
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: create_oscrc
|
||||
|
||||
- name: OSC Version
|
||||
import_role:
|
||||
name: osc
|
||||
vars:
|
||||
osc_options: "--version"
|
||||
register: osc_version
|
||||
|
||||
- name: Clean OSC Project
|
||||
import_role:
|
||||
name: osc
|
||||
vars:
|
||||
osc_options: rdelete -r -m 'rpm-packing CI Cleanup' {{ test_project }}
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create Project
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: create_meta
|
||||
|
||||
- name: Freeze Project
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: freeze
|
||||
|
||||
- name: Init Project
|
||||
import_role:
|
||||
name: osc
|
||||
vars:
|
||||
osc_options: init {{ test_project }}
|
||||
|
||||
- name: Add prjconf
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: create_prjconf
|
||||
when: target_distro == "centos"
|
||||
|
||||
- name: Find local directories with spec files
|
||||
find:
|
||||
paths: "{{ src_dir }}"
|
||||
hidden: false
|
||||
file_type: directory
|
||||
patterns: "{{ target_distro }}"
|
||||
recurse: yes
|
||||
register: specfiles
|
||||
|
||||
- name: Generate Repo name
|
||||
set_fact:
|
||||
repo_name: "{{ specfiles.files.0.path.split('/')[-3] }}"
|
||||
|
||||
- name: Generate Repo Dir
|
||||
set_fact:
|
||||
repo_dir: "{{ src_dir}}/{{ repo_name }}"
|
||||
|
||||
- debug:
|
||||
msg: "{{ repo_name }}: {{ repo_dir }} "
|
||||
|
||||
- name: List spec files
|
||||
debug:
|
||||
msg: "Specfile List: {{ specfiles }}"
|
||||
|
||||
- name: Create Project list
|
||||
set_fact:
|
||||
spec_dirs: "{{ spec_dirs }} + [ '{{ item.path.split('/')[-2] }}' ]"
|
||||
with_items: "{{ specfiles.files }}"
|
||||
|
||||
- name: Sort directories
|
||||
set_fact:
|
||||
sorted_dirs: "{{ spec_dirs | sort | unique }}"
|
||||
|
||||
- name: "list Sorted Directories"
|
||||
debug:
|
||||
msg: "Sorted Directories: {{ item }}"
|
||||
with_items: "{{ sorted_dirs }}"
|
||||
|
||||
- name: OSC Link Package
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: linkpackage
|
||||
|
||||
- name: OSC detachbranch
|
||||
import_role:
|
||||
name: osc
|
||||
tasks_from: detachbranch
|
||||
|
||||
# pushd ./out
|
||||
# sleep 5
|
||||
# # Check if there is no change, then pretent success
|
||||
# if [ $($osc_timed ls ${{OBS_TEST_PROJECT}} | wc -l) -lt 1 ]; then
|
||||
# echo "Apparently there is no change... claiming SUCCESS"
|
||||
# exit 0
|
||||
# fi
|
||||
#
|
||||
# while true; do
|
||||
# unset pending
|
||||
# unset failed
|
||||
# unset kickscheduler
|
||||
# unset succeeded
|
||||
# res=`osc results --csv -r standard`
|
||||
# if [ $? -ne 0 ]; then
|
||||
# sleep 5
|
||||
# continue
|
||||
# fi
|
||||
# echo "... $(date): "
|
||||
# for r in $res; do
|
||||
# # some failures?
|
||||
# if [[ $r =~ broken$ ]]; then
|
||||
# echo "ignoring OBS broken state"
|
||||
# echo $r
|
||||
# continue
|
||||
# fi
|
||||
# # some failures?
|
||||
# if [[ $r =~ (failed$|unresolvable$) ]]; then
|
||||
# echo $r
|
||||
# failed=1
|
||||
# fi
|
||||
# # still pending builds?
|
||||
# if [[ $r =~ (blocked$|scheduled$|dispatching$|building$|signing$) ]]; then
|
||||
# pending=1
|
||||
# fi
|
||||
# # scheduler stuck?
|
||||
# if [[ $r =~ (finished$|unknown$|outdated$) ]]; then
|
||||
# kickscheduler=1
|
||||
# fi
|
||||
# # found something?
|
||||
# if [[ $r =~ succeeded$ ]]; then
|
||||
# succeeded=1
|
||||
# fi
|
||||
# done
|
||||
#
|
||||
# if [ -n "$kickscheduler" ]; then
|
||||
# echo "# $(date)" | osc meta prjconf -F - ${{OBS_TEST_PROJECT}}
|
||||
# sleep $((RANDOM%60+30))
|
||||
# echo "kicking scheduler"
|
||||
# continue
|
||||
# fi
|
||||
#
|
||||
# if [ -n "$pending" ]; then
|
||||
# sleep $((RANDOM%50+30))
|
||||
# echo ""
|
||||
# continue
|
||||
# fi
|
||||
#
|
||||
# if [ -n "$failed" ]; then
|
||||
# echo "Build failed :-("
|
||||
# exit 1
|
||||
# elif [ -n "$succeeded" ];
|
||||
# break
|
||||
# fi
|
||||
# done
|
||||
#
|
||||
|
||||
# - name: Clean-up tmp directory
|
||||
# file:
|
||||
# path: "{{ stx_pkg_tmpdir.path }}"
|
||||
# state: absent
|
||||
# when: stx_pkg_tmpdir.path is defined
|
@ -25,16 +25,6 @@
|
||||
tox_envlist: rpm-packaging-lint
|
||||
files: .*\.spec
|
||||
|
||||
- job:
|
||||
name: stx-obs-build-opensuse
|
||||
nodeset: opensuse-15
|
||||
run: playbooks/buildproject.yaml
|
||||
|
||||
- job:
|
||||
name: stx-obs-build-centos
|
||||
nodeset: centos-7
|
||||
run: playbooks/buildproject.yaml
|
||||
|
||||
- job:
|
||||
name: stx-tox-bandit-static-scan
|
||||
parent: tox
|
||||
@ -49,5 +39,4 @@
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
- ^setup.cfg$
|
||||
- ^tools/(?!bandit.yml).*$
|
||||
- ^tox.ini$
|
||||
|
@ -63,17 +63,6 @@
|
||||
- stx-check-specfile:
|
||||
voting: false
|
||||
|
||||
- project-template:
|
||||
name: stx-build-rpms
|
||||
description: |
|
||||
Buiild RPMs via Ansible Playbook and OBS
|
||||
check:
|
||||
jobs:
|
||||
- stx-obs-build-centos:
|
||||
voting: false
|
||||
- stx-obs-build-opensuse:
|
||||
voting: false
|
||||
|
||||
- project-template:
|
||||
name: stx-bandit-jobs
|
||||
description: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user