OEL7: Fix CentOS7 Extras for OEL7 (#8219)
* OEL7: Fix CentOS7 Extras for OEL7 * Molecule: add logs collection for jobs
This commit is contained in:
parent
20157254c3
commit
2f44b40d68
4 changed files with 19 additions and 4 deletions
|
@ -16,6 +16,12 @@ molecule_tests:
|
||||||
- ./tests/scripts/vagrant_clean.sh
|
- ./tests/scripts/vagrant_clean.sh
|
||||||
script:
|
script:
|
||||||
- ./tests/scripts/molecule_run.sh
|
- ./tests/scripts/molecule_run.sh
|
||||||
|
after_script:
|
||||||
|
- chronic ./tests/scripts/molecule_logs.sh
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- molecule_logs/
|
||||||
|
|
||||||
.vagrant:
|
.vagrant:
|
||||||
extends: .testcases
|
extends: .testcases
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
- { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" }
|
- { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" }
|
||||||
- { option: "enabled", value: "1" }
|
- { option: "enabled", value: "1" }
|
||||||
- { option: "gpgcheck", value: "0" }
|
- { option: "gpgcheck", value: "0" }
|
||||||
- { option: "baseurl", value: "http://mirror.centos.org/centos/{{ ansible_distribution_major_version }}/extras/$basearch/os/" }
|
- { option: "baseurl", value: "http://mirror.centos.org/centos/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version|int > 7 %}os/{% endif %}" }
|
||||||
when:
|
when:
|
||||||
- use_oracle_public_repo|default(true)
|
- use_oracle_public_repo|default(true)
|
||||||
- '''ID="ol"'' in os_release.stdout_lines'
|
- '''ID="ol"'' in os_release.stdout_lines'
|
||||||
|
|
9
tests/scripts/molecule_logs.sh
Executable file
9
tests/scripts/molecule_logs.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Ensure a clean environent
|
||||||
|
rm -fr molecule_logs
|
||||||
|
mkdir -p molecule_logs
|
||||||
|
|
||||||
|
# Collect and archive the logs
|
||||||
|
find ~/.cache/molecule/ -name \*.out -o -name \*.err -type f | xargs tar -uf molecule_logs/molecule.tar
|
||||||
|
gzip molecule_logs/molecule.tar
|
|
@ -6,7 +6,7 @@ export LANG=C.UTF-8
|
||||||
|
|
||||||
for d in $(find roles -name molecule -type d)
|
for d in $(find roles -name molecule -type d)
|
||||||
do
|
do
|
||||||
cd $(dirname $d)
|
pushd $(dirname $d)
|
||||||
molecule test --all
|
molecule test --all
|
||||||
cd -
|
popd
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue