Skip to content

Commit

Permalink
[CI] Build packages for AlmaLinux 8
Browse files Browse the repository at this point in the history
Signed-off-by: Wojtek Porczyk <[email protected]>
  • Loading branch information
woju committed Jan 24, 2023
1 parent 4a00811 commit ecc9f6f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .ci/almalinux8.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM almalinux:8

RUN dnf install -y \
'dnf-command(config-manager)' \
epel-release \
git \
jq \
rpm-build
RUN dnf config-manager --set-enabled -y powertools

# NOTE: COPY invalidates docker cache when source file changes,
# so `dnf builddep` will rerun if dependencies change, despite no change
# in dockerfile.
COPY gramine.spec /gramine.spec
RUN dnf builddep -y /gramine.spec
44 changes: 44 additions & 0 deletions .ci/pkg-rpm-almalinux8.jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pipeline {
agent any
stages {
stage('makedist') {
agent {
dockerfile {
filename '.ci/almalinux8.dockerfile'
reuseNode true
}
}
steps {
sh '''
./scripts/makedist.sh
mkdir -p rpmbuild/SOURCES
mv gramine*.tar.* rpmbuild/SOURCES
'''
}
}
stage('build') {
agent {
dockerfile {
filename '.ci/almalinux8.dockerfile'
args '--network=none'
reuseNode true
}
}
steps {
sh '''
rpmbuild \
--define "_topdir $PWD/rpmbuild" \
-ba gramine.spec
'''
}
}
}
post {
always {
archiveArtifacts '''
rpmbuild/SRPMS/gramine*.src.rpm,
rpmbuild/RPMS/*/gramine*.rpm,
'''
}
}
}

0 comments on commit ecc9f6f

Please sign in to comment.