forked from prelz/BLAH
-
Notifications
You must be signed in to change notification settings - Fork 5
102 lines (88 loc) · 3.51 KB
/
build_and_test_rpms.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build and test blahp RPMs
on: [pull_request, push]
jobs:
build-rpms-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dver: [7]
target_env: [osg, uw_build]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare Docker
run: |
echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null &&
sudo service docker restart
- name: Start CentOS ${{ matrix.dver}} image
run: |
docker run --privileged --detach --env "container=docker" \
--hostname "blahp-ci.htcondor.org" \
--name $GITHUB_SHA \
--volume /sys/fs/cgroup:/sys/fs/cgroup \
--volume "$PWD":/blahp:rw \
centos:centos${{ matrix.dver }} \
/usr/sbin/init
- name: Build EL${{ matrix.dver }} RPMs (${{ matrix.target_env }})
run: |
docker exec $GITHUB_SHA \
/bin/bash -c \
"/blahp/tests/build_rpms.sh \
${{ matrix.dver }} \
${{ matrix.target_env}}"
- name: Install EL${{ matrix.dver }} RPMs (${{ matrix.target_env }})
run: |
docker exec $GITHUB_SHA \
/bin/bash -c \
"/blahp/tests/install_rpms.sh \
${{ matrix.dver }} \
${{ matrix.target_env}}"
- name: Run ${{ matrix.target_env }} integration tests (EL${{ matrix.dver }})
id: integration-tests
run: |
docker exec $GITHUB_SHA \
/bin/bash -c \
"/blahp/tests/test_inside_docker.sh \
${{ matrix.dver}} \
${{ matrix.target_env}}"
- name: Host certificate details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
openssl x509 -in /etc/grid-security/hostcert.pem -noout -text
- name: HTCondor configuration details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
condor_config_val -dump
- name: Slurm logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/bash -c "cat /var/log/slurm/*"
- name: HTCondor-CE logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
find /var/log/condor-ce -type f -exec cat {} \;
- name: HTCondor logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
find /var/log/condor -type f -exec cat {} \;
- name: BLAHP PBS status cache logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/bash -c "cat /var/tmp/qstat_status_vdttest/pbs_status.log"
- name: BLAHP Slurm status cache logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/bash -c "cat /var/tmp/slurm_status_vdttest/slurm_status.log"
- name: Verify preun/postun RPM sections
run: |
docker exec $GITHUB_SHA \
yum remove -y 'blahp'