.gitlab-ci.yml 1.14 KB
Newer Older
1 2 3 4 5 6
---

stages:
  - build
  - push

mh's avatar
mh committed
7
.build_rpm:
8 9 10
  stage: build
  tags:
    - rpmbuild
mh's avatar
mh committed
11
  image: $CI_REGISTRY/immerda/container-images/rpmbuild/centos:${RELEASE}
12
  script:
mh's avatar
mh committed
13
    - cp "repos.el${RELEASE}" /etc/yum.repos.d/puppet-reqs.repo
mh's avatar
mh committed
14
    - "[ $RELEASE -gt 7 ] || rm /etc/yum.repos.d/CentOS-SCLo-*"
mh's avatar
mh committed
15 16
    - sudo -u user cp puppetserver.conf /home/user/rpmbuild/SOURCES/
    - ibuild-rpm puppet-extensions.spec
17 18 19 20 21 22
  artifacts:
    expire_in: 1 day
    paths:
      - "*.rpm"
      - checksums

mh's avatar
mh committed
23
.push_rpm:
24 25 26
  stage: push
  tags:
    - rpmbuild
mh's avatar
mh committed
27
  image: $CI_REGISTRY/immerda/container-images/rpmbuild/centos:$RELEASE
28
  script:
mh's avatar
mh committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42
    - ipush "el${RELEASE}"
    - echo -e "Hi\nThere are new RPMs availabe to be signed for ${CI_PROJECT_URL} on EL${RELEASE}\nHave a look at the pipeline ${CI_PIPELINE_URL}\n\nChecksums:\n\n$(cat checksums)" | imail "New RPM built for ${CI_PROJECT_NAME}"

build_el7:
  variables:
    RELEASE: 7
  extends: .build_rpm

build_el8:
  variables:
    RELEASE: 8
  extends: .build_rpm

push_el7:
mh's avatar
use DAG  
mh committed
43
  needs:
mh's avatar
mh committed
44
    - build_el7
mh's avatar
mh committed
45 46 47 48 49
  variables:
    RELEASE: 7
  extends: .push_rpm

push_el8:
mh's avatar
use DAG  
mh committed
50
  needs:
mh's avatar
mh committed
51
    - build_el8
mh's avatar
mh committed
52 53 54
  variables:
    RELEASE: 8
  extends: .push_rpm