Skip to content

Commit eefada4

Browse files
committed
.gitlab-ci.yml: add test which runs the container
1 parent 98d26ec commit eefada4

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.gitlab-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,37 @@ run:
100100
- if [ "$CI_JOB_STATUS" = "success" ]; then schutzbot/update_github_status.sh finish "$FROM_REF"; fi
101101
- section_end after_script
102102

103+
104+
test:
105+
extends: .terraform
106+
stage: run
107+
variables:
108+
RUNNER: aws/rhel-10.1-ga-x86_64
109+
before_script:
110+
- . schutzbot/gitlab-utils.sh
111+
- section_start before_script "Run before script section"
112+
- schutzbot/ec2-spot-check.sh &
113+
- mkdir -p /tmp/artifacts && schutzbot/ci_details.sh > /tmp/artifacts/ci-details-before-run.txt
114+
- cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
115+
- |
116+
# Push only on main branch
117+
if [ "$CI_COMMIT_BRANCH" != "main" ]; then
118+
unset DST_CREDS
119+
fi
120+
- section_end before_script
121+
script:
122+
- podman run $(podman build -f distribution/Dockerfile-ubi . | tail -n 1)
123+
after_script:
124+
- . schutzbot/gitlab-utils.sh
125+
- section_start after_script "Run after script section"
126+
- schutzbot/ci_details.sh > /tmp/artifacts/ci-details-after-run.txt || true
127+
- schutzbot/unregister.sh || true
128+
- schutzbot/save_journal.sh || true
129+
- schutzbot/upload_artifacts.sh
130+
- if [ "$CI_JOB_STATUS" = "success" ]; then schutzbot/update_github_status.sh finish; else schutzbot/update_github_status.sh finish; fi
131+
- section_end after_script
132+
133+
103134
finish:
104135
extends: .base
105136
stage: finish

0 commit comments

Comments
 (0)