-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
41 lines (36 loc) · 1.09 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
41 lines (36 loc) · 1.09 KB
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
image: quay.io/podman/stable
stages:
- build
- test
- push
before_script:
- if [ "$INSECURE" = "true" ]; then podman_args="--tls-verify=false"; else podman_args=""; fi
- podman login $podman_args -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY_URL"
build_docker_image:
stage: build
script:
- podman build -t "$REGISTRY_URL/$CI_PROJECT_NAME:$CI_COMMIT_SHA" .
- mkdir image
- podman save "$REGISTRY_URL/$CI_PROJECT_NAME:$CI_COMMIT_SHA" > image/image.tar
artifacts:
paths:
- image
run_tests:
stage: test
script:
- podman load -i image/image.tar
- echo "Running tests"
- mkdir reports
- podman run --rm "$REGISTRY_URL/$CI_PROJECT_NAME:$CI_COMMIT_SHA" /bin/bash -c "python3 -m xmlrunner discover -o reports && ls -la reports" -v $CI_PROJECT_DIR/reports:/autoblender/reports
- ls -la $CI_PROJECT_DIR/reports
artifacts:
reports:
junit:
- reports/*.xml
push_docker_image:
stage: push
script:
- podman load -i image/image.tar
- podman push $podman_args "$REGISTRY_URL/$CI_PROJECT_NAME:$CI_COMMIT_SHA"
only:
- master