summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: c53e2e446f7a8815b6ccfd209000e006b931f892 (plain)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
stages:
  - verify
  - trigger

variables:
  GIT_STRATEGY: clone
  GIT_DEPTH: "500"

# only rune pipelines for merge requests or when tags are pushed  (for triggers)
workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_TAG

lint:
  stage: verify
  image: alpinelinux/apkbuild-lint-tools:latest
  interruptible: true
  script:
    - lint
  allow_failure: true
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  tags:
    - docker-alpine
    - x86_64

.build:
  stage: verify
  image: alpinelinux/alpine-gitlab-ci:latest
  interruptible: true
  script:
    - build.sh
  artifacts:
    paths:
      - packages/
      - keys/
      - logs/
    expire_in: 1 day
    when: always
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

build-x86_64:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_x86_64
  tags:
    - docker-alpine
    - ci-build
    - x86_64

build-x86:
  extends: .build
  image:
    name: alpinelinux/alpine-gitlab-ci:latest-x86
    entrypoint: ["linux32", "sh", "-c"]
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_x86
  tags:
    - docker-alpine
    - ci-build
    - x86

build-s390x:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_s390x
  tags:
    - docker-alpine
    - ci-build
    - s390x

build-ppc64le:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_ppc64le
  tags:
    - docker-alpine
    - ci-build
    - ppc64le

build-aarch64:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_aarch64
  tags:
    - docker-alpine
    - ci-build
    - aarch64

build-armv7:
  extends: .build
  image:
    name: alpinelinux/alpine-gitlab-ci:latest-armv7
    entrypoint: ["linux32", "sh", "-c"]
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_armv7
  tags:
    - docker-alpine
    - ci-build
    - armv7

build-armhf:
  extends: .build
  image:
    name: alpinelinux/alpine-gitlab-ci:latest-armhf
    entrypoint: ["linux32", "sh", "-c"]
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_armhf
  tags:
    - docker-alpine
    - ci-build
    - armhf

build-riscv64:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_riscv64
  tags:
    - docker-alpine
    - ci-build
    - riscv64

build-loongarch64:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_loongarch64
  variables:
    MIRROR: https://dev.alpinelinux.org/
  tags:
    - docker-alpine
    - ci-build
    - loongarch64
  allow_failure: true

trigger_build_image:
  stage: trigger
  rules:
    - if: $CI_COMMIT_TAG
  variables:
    APORTS_TAG: $CI_COMMIT_TAG
  trigger:
    project: clandmeter/alpine-disk-image
    branch: master