Attempt to update packit flow to build in COPR
No idea if this will really work, but at least `packit srpm` does work now.
This commit is contained in:
parent
6b8295ada1
commit
7ba8dbf0cc
18
.packit.yaml
18
.packit.yaml
|
|
@ -1,14 +1,24 @@
|
||||||
# build into f34-coreos-continuous on every commit to main
|
# build into f34-coreos-continuous on every commit to main
|
||||||
jobs:
|
jobs:
|
||||||
- job: production_build
|
- job: copr_build
|
||||||
trigger: commit
|
trigger: commit
|
||||||
metadata:
|
metadata:
|
||||||
branch: main
|
branch: main
|
||||||
targets: f34-coreos-continuous
|
owner: "@CoreOS"
|
||||||
|
project: continuous
|
||||||
|
targets:
|
||||||
|
- centos-stream-8-aarch64
|
||||||
|
- centos-stream-8-x86_64
|
||||||
|
- fedora-all-aarch64
|
||||||
|
- fedora-all-s390x
|
||||||
|
- fedora-all
|
||||||
specfile_path: ostree.spec
|
specfile_path: ostree.spec
|
||||||
actions:
|
actions:
|
||||||
|
create-archive:
|
||||||
|
- "./ci/make-git-snapshot.sh"
|
||||||
|
- "bash -c 'ls ostree-*.tar'"
|
||||||
# https://packit.dev/faq/#how-can-i-download-rpm-spec-file-if-it-is-not-part-of-upstream-repository
|
# https://packit.dev/faq/#how-can-i-download-rpm-spec-file-if-it-is-not-part-of-upstream-repository
|
||||||
post-upstream-clone:
|
post-upstream-clone:
|
||||||
- "wget https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec"
|
- "curl -LO https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec"
|
||||||
# we don't want any downstream patches
|
# we don't want any downstream patches
|
||||||
- "sed -ie 's/^Patch/# Patch/g' ostree.spec"
|
- "sed -ie 's/^Patch/# Patch/g' ostree.spec"
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
set -xeuo pipefail
|
||||||
|
|
||||||
srcdir=$1
|
TOP=$(git rev-parse --show-toplevel)
|
||||||
shift
|
GITREV=$(git rev-parse HEAD)
|
||||||
PKG_VER=$1
|
gitdescribe=$(git describe --always --tags $GITREV)
|
||||||
shift
|
version=$(echo "$gitdescribe" | sed -e 's,-,\.,g' -e 's,^v,,')
|
||||||
GITREV=$1
|
name=$(basename $(pwd))
|
||||||
shift
|
PKG_VER="${name}-${version}"
|
||||||
|
|
||||||
TARFILE=${PKG_VER}.tar
|
TARFILE=${PKG_VER}.tar
|
||||||
TARFILE_TMP=${TARFILE}.tmp
|
TARFILE_TMP=${TARFILE}.tmp
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
test -n "${srcdir}"
|
|
||||||
test -n "${PKG_VER}"
|
|
||||||
test -n "${GITREV}"
|
|
||||||
|
|
||||||
TOP=$(git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
echo "Archiving ${PKG_VER} at ${GITREV} to ${TARFILE_TMP}"
|
echo "Archiving ${PKG_VER} at ${GITREV} to ${TARFILE_TMP}"
|
||||||
(cd ${TOP}; git archive --format=tar --prefix=${PKG_VER}/ ${GITREV}) > ${TARFILE_TMP}
|
(cd ${TOP}; git archive --format=tar --prefix=${PKG_VER}/ ${GITREV}) > ${TARFILE_TMP}
|
||||||
ls -al ${TARFILE_TMP}
|
ls -al ${TARFILE_TMP}
|
||||||
(cd ${TOP}; git submodule status) | while read line; do
|
(cd ${TOP}; git submodule status) | while read line; do
|
||||||
rev=$(echo ${line} | cut -f 1 -d ' '); path=$(echo ${line} | cut -f 2 -d ' ')
|
rev=$(echo ${line} | cut -f 1 -d ' '); path=$(echo ${line} | cut -f 2 -d ' ')
|
||||||
echo "Archiving ${path} at ${rev}"
|
echo "Archiving ${path} at ${rev}"
|
||||||
(cd ${srcdir}/${path}; git archive --format=tar --prefix=${PKG_VER}/${path}/ ${rev}) > submodule.tar
|
(cd ${TOP}/${path}; git archive --format=tar --prefix=${PKG_VER}/${path}/ ${rev}) > submodule.tar
|
||||||
tar -A -f ${TARFILE_TMP} submodule.tar
|
tar -A -f ${TARFILE_TMP} submodule.tar
|
||||||
rm submodule.tar
|
rm submodule.tar
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue