OEL7: Fix CentOS7 Extras for OEL7 (#8219)

* OEL7: Fix CentOS7 Extras for OEL7

* Molecule: add logs collection for jobs
pull/8251/head
Cristian Calin 2021-11-29 23:39:21 +02:00 committed by GitHub
parent 20157254c3
commit 2f44b40d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View File

@ -16,6 +16,12 @@ molecule_tests:
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/molecule_run.sh
after_script:
- chronic ./tests/scripts/molecule_logs.sh
artifacts:
when: always
paths:
- molecule_logs/
.vagrant:
extends: .testcases

View File

@ -79,7 +79,7 @@
- { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" }
- { option: "enabled", value: "1" }
- { 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:
- use_oracle_public_repo|default(true)
- '''ID="ol"'' in os_release.stdout_lines'

View 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

View File

@ -6,7 +6,7 @@ export LANG=C.UTF-8
for d in $(find roles -name molecule -type d)
do
cd $(dirname $d)
pushd $(dirname $d)
molecule test --all
cd -
popd
done