Browse Source
OEL7: Fix CentOS7 Extras for OEL7 (#8219)
* OEL7: Fix CentOS7 Extras for OEL7
* Molecule: add logs collection for jobs
pull/8251/head
Cristian Calin
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
19 additions and
4 deletions
-
.gitlab-ci/vagrant.yml
-
roles/bootstrap-os/tasks/bootstrap-centos.yml
-
tests/scripts/molecule_logs.sh
-
tests/scripts/molecule_run.sh
|
|
@ -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 |
|
|
|
|
|
@ -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' |
|
|
|
|
|
@ -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) |
|
|
|
do |
|
|
|
cd $(dirname $d) |
|
|
|
pushd $(dirname $d) |
|
|
|
molecule test --all |
|
|
|
cd - |
|
|
|
done |
|
|
|
popd |
|
|
|
done |