]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
gitlabci: fix pkgbuild jobs
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 20 Feb 2019 14:57:51 +0000 (15:57 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:35 +0000 (10:43 +0100)
.gitlab-ci.yml
scripts/make-srpm.sh

index eab9c1478ae9eebe669f0c3c55eaeb93972094aa..ec00ea4176c0a1d18989faeef35403eeb3739a8a 100644 (file)
@@ -32,12 +32,20 @@ stages:
     paths:
       - .local
       - build_ci*
-      - "*.src.rpm"
+      - build_dist/meson-dist/*.tar.xz
   tags:
     - docker
     - linux
     - amd64
 
+archive:
+  <<: *build
+  variables:
+    GIT_COMMITER_NAME: 'ci'
+    EMAIL: 'ci@nic'
+  script:
+    - ./scripts/make-dev-archive.sh
+
 build:
   <<: *build
   script:
@@ -86,16 +94,6 @@ kres-gen:
     - ninja -C build_ci lib/libkres.so.${LIBKRES_ABI}
     - ninja -C build_ci kres-gen
     - git diff --quiet || (git diff; exit 1)
-
-pkg:srpm:
-  <<: *build
-  image: $CI_REGISTRY/knot/knot-resolver/ci/fedora
-  allow_failure: true  # don't block testing pipeline in case of failure
-  variables:
-    GIT_COMMITER_NAME: 'ci'
-    EMAIL: 'ci@nic'
-  script:
-    - scripts/make-srpm.sh
 # }}}
 
 # test {{{
@@ -286,7 +284,7 @@ respdiff:basic:
     - linux
     - amd64
 
-pkg:fedora-29:
+.pkgbuild: &pkgbuild
   stage: test
   except:
     - master
@@ -295,41 +293,31 @@ pkg:fedora-29:
     - branches@knot/knot-resolver
     - branches@knot/knot-resolver-security
   dependencies:
-    - pkg:srpm
-  script:
-    - mock --no-clean --old-chroot -r fedora-29-x86_64 --rebuild *.src.rpm || (cat /var/lib/mock/fedora-29-x86_64/result/build.log; false)
-  after_script:
-    - mv /var/lib/mock/fedora-29-x86_64/result fedora-29-x86_64
+    - archive
   artifacts:
     when: always
-    expire_in: '1 week'
     paths:
+      - epel-7-x86_64/
       - fedora-29-x86_64/
+      - "*.src.rpm"
   tags:
     - privileged  # mock requires additional capabilities (e.g. mount)
 
 pkg:epel-7:
-  stage: test
-  except:
-    - master
-  image: $CI_REGISTRY/knot/knot-resolver/ci/fedora
-  only:  # trigger job only in repos under our control
-    - branches@knot/knot-resolver
-    - branches@knot/knot-resolver-security
-  dependencies:
-    - pkg:srpm
+  <<: *pkgbuild
   script:
+    - ./scripts/make-srpm.sh
     - mock --no-clean --dnf --old-chroot -r epel-7-x86_64 --rebuild *.src.rpm || (cat /var/lib/mock/epel-7-x86_64/result/build.log; false)
   after_script:
     - mv /var/lib/mock/epel-7-x86_64/result epel-7-x86_64
-  artifacts:
-    when: always
-    expire_in: '1 week'
-    paths:
-      - epel-7-x86_64/
-  tags:
-    - privileged  # mock require additional capabilities (e.g. mount)
 
+pkg:fedora-29:
+  <<: *pkgbuild
+  script:
+    - ./scripts/make-srpm.sh
+    - mock --no-clean --old-chroot -r fedora-29-x86_64 --rebuild *.src.rpm || (cat /var/lib/mock/fedora-29-x86_64/result/build.log; false)
+  after_script:
+    - mv /var/lib/mock/fedora-29-x86_64/result fedora-29-x86_64
 # }}}
 
 # extended {{{
index 44f083e3dcf56a8a6f97142e8c3cc444f9ee6a4d..b6aa37940f5e39064602d6b78a8a572faf3d9afe 100755 (executable)
@@ -1,10 +1,9 @@
 #!/bin/bash
+# Create a source rpm for Fedora/EPEL
 set -o errexit -o nounset -o xtrace
 
-# Create a source rpm for Fedora/EPEL
+cd "$(dirname ${0})/.."
 
-cd "$(git rev-parse --show-toplevel)"
-scripts/make-dev-archive.sh
 scripts/make-distrofiles.sh
 mv knot-resolver_*.orig.tar.xz distro/rpm/
 cd distro/rpm