Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
mital-suse committed Jul 29, 2019
2 parents 807aea3 + a815751 commit 1684021
Show file tree
Hide file tree
Showing 609 changed files with 13,780 additions and 5,378 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
exclude_patterns:
- "scripts/jenkins/ardana/ansible/roles/heat_stack/library/ecp_os_stack.py"
- "scripts/jenkins/cloud/ansible/roles/heat_stack/library/ecp_os_stack.py"
5 changes: 5 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((sh-mode
((sh-basic-offset . 4))))
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ mkcloud.*
.artifacts
pids/
screenlog*
.byebug_history

scripts/jenkins/cloud/manual/ansible-venv
scripts/jenkins/cloud/manual/mitogen
scripts/jenkins/cloud/ansible/ansible_facts
scripts/jenkins/cloud/ansible/*-virt-config.yml
scripts/jenkins/cloud/ansible/input_model
scripts/jenkins/cloud/ansible/heat-stack-*.yml

scripts/jenkins/ses/ansible/ansible_facts
scripts/jenkins/ses/ansible/ses-stack-template.yml
57 changes: 51 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
language: bash
sudo: required
install:
- make install
script:
- make test
dist: xenial

matrix:
include:
- name: "Validate Filenames"
language: minimal
script:
- make filecheck
- name: "Validate Bash (bashate, roundup)"
language: python
install:
- pip install bashate
- git clone https://github.com/SUSE-Cloud/roundup
- pushd roundup
- ./configure
- make
- sudo make install
- popd
script:
- make bashate
- make rounduptest
- name: "Validate Perl (Syntax)"
language: minimal
addons:
apt:
packages:
- libxml-libxml-perl
- libjson-perl
- libjson-xs-perl
- libwww-perl
script:
- make perlcheck
- name: "Validate Ruby (Syntax)"
language: ruby
script:
- make rubycheck
- name: "Validate Python (Syntax, Unit, flake8)"
language: python
install:
- pip install flake8
- pip install flake8-import-order
script:
- make pythoncheck
- make python_unittest
- make flake8
- name: "Validate Jenkins (jjb)"
language: python
install:
- pip install 'jenkins-job-builder!=3.0.0'
script:
- make jjb_test
49 changes: 26 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ filecheck:
xargs grep $$'\t'

bashate:
cd scripts && \
for f in \
*.sh mkcloud mkchroot repochecker \
jenkins/{update_automation,*.sh} \
../hostscripts/ci1/* ../hostscripts/clouddata/syncSLErepos ../mkcloudruns/*/[^R]*;\
`find -name \*.sh` \
hostscripts/ci1/* \
hostscripts/clouddata/{syncSLErepos,syncgitrepos} \
hostscripts/gatehost/{sudo-freshadminvm,freshadminvm} \
hostscripts/nagios/ci-o-o \
mkcloudruns/*/[^R]*\
scripts/{mkcloud,mkchroot,repochecker} \
scripts/jenkins/update_automation \
scripts/mkcloudhost/{runtestn,mkcloud_free_pool,mkcloude,fixlibvirt,generate-radvd-conf} \
scripts/mkcloudhost/{runtestmulticloud,boot.local,boot.mkcloud,mkcloud_reserve_pool,runtestn} \
scripts/mkcloudhost/{routed.cloud,hacloud.common,cloudrc.host,cloudfunc} \
; \
do \
echo "checking $$f"; \
bash -n $$f || exit 3; \
Expand All @@ -25,7 +33,7 @@ bashate:

perlcheck:
cd scripts && \
for f in `find -name \*.pl` jenkins/{apicheck,grep,japi} mkcloudhost/allocpool ; \
for f in `find -name \*.pl` jenkins/{apicheck,grep,japi} mkcloudhost/{allocpool,correlatevirsh} ; \
do \
perl -wc $$f || exit 2; \
done
Expand All @@ -39,21 +47,24 @@ rubycheck:
pythoncheck:
for f in `find -name \*.py` scripts/lib/libvirt/{admin-config,cleanup,compute-config,net-config,net-start,vm-start} scripts/jenkins/jenkins-job-trigger; \
do \
python -m py_compile $$f || exit 22; \
python2 -m py_compile $$f || exit 22; \
python3 -m py_compile $$f || exit 22; \
done

rounduptest:
cd scripts && roundup
cd scripts/jenkins && roundup

flake8:
flake8 scripts/ hostscripts/soc-ci/soc-ci
flake8 .

python_unittest:
python -m unittest discover -v -s scripts/lib/libvirt/
python2 -m unittest discover -v
python3 -m unittest discover -v

gerrit-project-regexp:
scripts/jenkins/ardana/gerrit/project-map2project-regexp.py > jenkins/ci.suse.de/gerrit-project-regexp.txt
scripts/jenkins/cloud/gerrit/project-map2project-regexp.py master > jenkins/ci.suse.de/gerrit-project-regexp-cloud9.txt
scripts/jenkins/cloud/gerrit/project-map2project-regexp.py stable/pike > jenkins/ci.suse.de/gerrit-project-regexp-cloud8.txt

jjb_test: gerrit-project-regexp
jenkins-jobs --ignore-cache test jenkins/ci.suse.de:jenkins/ci.suse.de/templates/ cloud* openstack* > /dev/null
Expand All @@ -65,23 +76,15 @@ cisd_deploy: gerrit-project-regexp
cioo_deploy:
jenkins-jobs --conf /etc/jenkins_jobs/jenkins_jobs-cioo.ini update jenkins/ci.opensuse.org:jenkins/ci.opensuse.org/templates/ openstack*

# for travis-CI:
install: debianinstall genericinstall

debianinstall:
sudo apt-get update -qq
sudo apt-get -y install libxml-libxml-perl libjson-perl libjson-xs-perl python-libvirt

suseinstall:
sudo zypper install perl-JSON-XS perl-libxml-perl python-pip libvirt-python
shellcheck:
shellcheck `grep -Erl '^#! ?/bin/b?a?sh'`

genericinstall:
sudo pip install -U 'pbr>=2.0.0,!=2.1.0' bashate 'flake8<3.0.0' flake8-import-order jenkins-job-builder requests
install:
sudo zypper install perl-JSON-XS perl-libxml-perl perl-libwww-perl python-pip python3-pip libvirt-python python3-libvirt-python
sudo pip2 install -U bashate flake8 flake8-import-order jenkins-job-builder
sudo pip3 install -U bashate flake8 flake8-import-order jenkins-job-builder
git clone https://github.com/SUSE-Cloud/roundup && \
cd roundup && \
./configure && \
make && \
sudo make install

shellcheck:
shellcheck `grep -Erl '^#! ?/bin/b?a?sh'`
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This project has several scripts for different automated tasks. Some of them are

# Documentation

## Crowbar deployments
## Crowbar mkcloud deployments

Find out more in [`/docs/mkcloud.md`](docs/mkcloud.md)

## Ardana deployments
## Unified Cloud deployments

Find out more in [`/docs/ardana/`](docs/ardana/)

Expand Down
6 changes: 3 additions & 3 deletions docs/ardana/rpm-file-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Ardana deployment (including a tempest run, if deployment succeeded),
and comparing the results. If any tampering is discovered, `init.yml`
will fail with a helpful error.

[Whitelists](../../scripts/jenkins/ardana/ansible/files/) are used to
[Whitelists](../../scripts/jenkins/cloud/ansible/files/) are used to
ignore known exceptions, some of which need to be fixed in the future.

## Testing changes to the checks

[The `test-post-deployment-checks.yml`
playbook](../../scripts/jenkins/ardana/ansible/test-post-deployment-checks.yml)
playbook](../../scripts/jenkins/cloud/ansible/test-post-deployment-checks.yml)
is also provided for rapid repeated testing of the post-deployment
checks, without having to deploy an entire fresh cloud each time:

Expand Down Expand Up @@ -47,7 +47,7 @@ checks, without having to deploy an entire fresh cloud each time:
git fetch myremote
git reset --hard myremote/mybranch

- `cd scripts/jenkins/ardana/ansible/`
- `cd scripts/jenkins/cloud/ansible/`

- Run the following command, replacing the temporary directory with
the one you identified above:
Expand Down
Loading

0 comments on commit 1684021

Please sign in to comment.