.gitlab-ci.yml 2.05 KB
Newer Older
Kevin Daudt's avatar
Kevin Daudt committed
1 2
stages:
  - lint
3
  - build
Kevin Daudt's avatar
Kevin Daudt committed
4

5
variables:
Kevin Daudt's avatar
Kevin Daudt committed
6
  GIT_STRATEGY: clone
Kevin Daudt's avatar
Kevin Daudt committed
7
  GIT_DEPTH: "500"
8

9 10 11 12
default:
    # Make sure master points to the correct upstream commit
    before_script:
      - >
13
        git fetch -nq $CI_MERGE_REQUEST_PROJECT_URL
14 15
        +refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME:refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME

Kevin Daudt's avatar
Kevin Daudt committed
16 17 18 19 20 21 22 23 24 25 26
lint:
  stage: lint
  image: alpinelinux/apkbuild-lint-tools:latest
  script:
    - changed-aports $CI_MERGE_REQUEST_TARGET_BRANCH_NAME | lint
  allow_failure: true
  only:
    - merge_requests
  tags:
    - docker-alpine
    - x86_64
27 28 29 30 31 32

.build:
  stage: build
  image: alpinelinux/alpine-gitlab-ci:latest
  script:
    - build.sh
33 34 35 36
  artifacts:
    paths:
      - packages/
      - keys/
Kevin Daudt's avatar
Kevin Daudt committed
37
      - logs/
38
    expire_in: 1 day
Kevin Daudt's avatar
Kevin Daudt committed
39
    when: always
40 41 42 43 44
  only:
    - merge_requests

build-x86_64:
  extends: .build
45 46
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_x86_64
47 48 49 50 51 52 53 54 55 56
  tags:
    - docker-alpine
    - ci-build
    - x86_64

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

64 65 66 67 68 69 70 71 72
build-s390x:
  extends: .build
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_s390x
  tags:
    - docker-alpine
    - ci-build
    - s390x

73 74
build-ppc64le:
  extends: .build
75 76
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_ppc64le
77 78 79 80
  tags:
    - docker-alpine
    - ci-build
    - ppc64le
81 82 83 84 85 86 87 88 89

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

build-armv7:
  extends: .build
93
  image:
Kevin Daudt's avatar
Kevin Daudt committed
94
    name: alpinelinux/alpine-gitlab-ci:latest-armv7
95
    entrypoint: ["linux32", "sh", "-c"]
96 97 98 99 100 101
  artifacts:
    name: MR${CI_MERGE_REQUEST_ID}_armv7
  tags:
    - docker-alpine
    - ci-build
    - armv7
Kevin Daudt's avatar
Kevin Daudt committed
102 103 104 105 106 107 108 109 110 111 112 113

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