56 lines
1.7 KiB
Plaintext
Executable File
56 lines
1.7 KiB
Plaintext
Executable File
# Update and install curl, tar, createrepo-c, and gzip as
|
|
# they aren't in the base OS image and are needed
|
|
# for creating a local filesystem repo
|
|
#
|
|
# Adapted from https://agama.jf.intel.com/drivers/dg1/suse/local
|
|
|
|
# Prerequisites
|
|
#
|
|
RUN dnf install -y \
|
|
curl \
|
|
tar \
|
|
createrepo_c \
|
|
gzip
|
|
|
|
# Make /repos/${BUILD} directory
|
|
#
|
|
WORKDIR /repos/${BUILD}
|
|
|
|
# Download ${BUILD} artifacts
|
|
#
|
|
# ARTIFACTORY_PATH is set by scripts/build-dockerfile.sh based on the value of
|
|
# BUILD. For example, agama-ci-releases_20.4 becomes agama-ci-releases/20.4
|
|
#
|
|
# sh (the shell interpreter of Docker) does not support subsitution so
|
|
# this can't be done within the Dockerfile itself.
|
|
#
|
|
# Since we're already making special variables, scripts/build-dockerfile.sh
|
|
# will also set ARTIFACTORY_RELEASE based on the OS_RELEASE name if Ubuntu
|
|
# is being used (eg., 20.04 for focal, etc)
|
|
#
|
|
RUN --mount=type=secret,id=credentials \
|
|
curl -s --noproxy '*' \
|
|
--netrc-file /run/secrets/credentials -L \
|
|
https://gfx-assets-build.fm.intel.com/artifactory/api/archive/download/agama-builds/ci/${ARTIFACTORY_PATH}/${BUILD}/artifacts/linux/${OS_DISTRO}/${ARTIFACTORY_RELEASE}?archiveType=tgz \
|
|
| tar -xvz --warning=no-timestamp
|
|
|
|
# Eventually the repodata should be part of the artifacts;
|
|
# Currently, however, the published repodata has invalid
|
|
# sha256 sums for the RPMs
|
|
RUN rm -rf /repos/${BUILD}/repodata
|
|
|
|
# Turn /repos/${BUILD} into a local package repository
|
|
#
|
|
RUN createrepo /repos/${BUILD}
|
|
|
|
# Add the local package repository to the system
|
|
RUN { \
|
|
echo "[intel-graphics-local]" ; \
|
|
echo "name=intel-graphics-local" ; \
|
|
echo "baseurl=file:///repos/${BUILD}" ; \
|
|
echo "enabled=1" ; \
|
|
echo "gpgcheck=0" ; \
|
|
} > /etc/yum.repos.d/intel-graphics-local.repo
|
|
|
|
|