-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
70 lines (64 loc) · 2.35 KB
/
.gitlab-ci.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
include:
- file: /Scan/trivy.yml
project: jitesoft/gitlab-ci-lib
- file: /OCI/push-readme.yml
project: jitesoft/gitlab-ci-lib
stages:
- readme
- pre
- download
- containerize
- scan
variables:
PLATFORMS: "linux/amd64,linux/arm64"
update-readme:
stage: pre
extends: .readme-check.v2
variables:
PUSHRM_FILE: "$CI_PROJECT_DIR/README.md"
GIT_DEPTH: "3"
REGISTRIES: "quay.io/jitesoft/phpunit,docker.io/jitesoft/phpunit"
tags: [ protected ]
download:
parallel:
matrix:
- { VERSION: "8", GIT_STRATEGY: "none" }
- { VERSION: "9", GIT_STRATEGY: "none" }
- { VERSION: "10", GIT_STRATEGY: "none" }
stage: download
image: registry.gitlab.com/jitesoft/dockerfiles/misc:latest
variables:
VERSION: ""
GIT_STRATEGY: none
script:
- wget -qO- https://sebastian-bergmann.de/gpg.asc | gpg --import
- wget https://phar.phpunit.de/phpunit-${VERSION}.phar
- wget https://phar.phpunit.de/phpunit-${VERSION}.phar.asc
- gpg --verify phpunit-${VERSION}.phar.asc phpunit-${VERSION}.phar
- mkdir bin
- mv phpunit-${VERSION}.phar bin/
artifacts:
paths:
- bin/
expire_in: 1 hour
containerize:
parallel:
matrix:
- { PHP_VERSION: "8.3", TAGS: "latest,stable,8.3-10,8.3", UNIT_VERSION: "10" }
- { PHP_VERSION: "8.2", TAGS: "8.2-10,8.2", UNIT_VERSION: "10" }
- { PHP_VERSION: "8.2", TAGS: "8.2-9", UNIT_VERSION: "9" }
- { PHP_VERSION: "8.1", TAGS: "8.1-9,8.1", UNIT_VERSION: "9" }
stage: containerize
image: registry.gitlab.com/jitesoft/dockerfiles/misc:latest
script:
- TAG_LIST=$(helper "ghcr.io/jitesoft/phpunit,jitesoft/phpunit,${CI_REGISTRY_IMAGE},quay.io/jitesoft/phpunit" "${TAGS}")
- docker buildx build --platform ${PLATFORMS} --progress plain --push ${TAG_LIST} --build-arg PHP_VERSION=${PHP_VERSION} --build-arg UNIT_VERSION=${UNIT_VERSION} .
tags: [ jitesoft, buildx, protected ]
scan:
extends: .container_scanning
parallel:
matrix:
- { SCANNING_IMAGE_NAME: "${CI_REGISTRY_IMAGE}:8.3-10", GIT_STRATEGY: "none" }
- { SCANNING_IMAGE_NAME: "${CI_REGISTRY_IMAGE}:8.2-10", GIT_STRATEGY: "none" }
- { SCANNING_IMAGE_NAME: "${CI_REGISTRY_IMAGE}:8.2-9", GIT_STRATEGY: "none" }
- { SCANNING_IMAGE_NAME: "${CI_REGISTRY_IMAGE}:8.1-9", GIT_STRATEGY: "none" }