Add local file repo
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
3074877618
commit
7a5ceab2e2
53
templates/rhel/20-local-file-intel-repo.in
Executable file
53
templates/rhel/20-local-file-intel-repo.in
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
# 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 curl -s --noproxy '*' -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
|
||||||
|
|
||||||
|
|
45
templates/sles/20-local-file-intel-repo.in
Executable file
45
templates/sles/20-local-file-intel-repo.in
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
# 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 zypper 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 curl -s --noproxy '*' -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 zypper addrepo -G -e -f /repos/${BUILD} ${BUILD}
|
Loading…
x
Reference in New Issue
Block a user