Skip to content

Commit

Permalink
Merge pull request #294 from Cray-HPE/casmcms-9114
Browse files Browse the repository at this point in the history
CASMCMS-9114: Build Docker image on SLE15 SP6 (up from SP4)
  • Loading branch information
mharding-hpe authored Aug 22, 2024
2 parents 9e21e94 + 9ba3812 commit 1e19300
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.16.34] - 2024-08-22

### Dependencies

- CASMCMS-9114: Build Docker image on SLE15 SP6 (up from SP4)

## [1.16.33] - 2024-06-26

### Added
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#
# Dockerfile for importing CSM content into gitea, to be used with CFS

FROM artifactory.algol60.net/registry.suse.com/suse/sle15:15.4 as product-content-base
FROM artifactory.algol60.net/registry.suse.com/suse/sle15:15.6 as product-content-base
WORKDIR /

ARG SP=4
ARG SP=6
ARG ARCH=x86_64

# Pin the version of csm-ssh-keys being installed. The actual version is substituted by
Expand Down
16 changes: 10 additions & 6 deletions zypper-docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ function add_zypper_repos {
zypper --non-interactive ar "${SLES_UPDATES_URL}/SLE-${label}/15-SP${SP}/${ARCH}/update/?auth=basic" "sles15sp${SP}-${label}-update"
}

if [[ ${SP} -eq 4 ]]; then
# The current sles15sp4 base image starts with a lock on coreutils, but this prevents a necessary
# security patch from being applied. Thus, adding this command to remove the lock if it is
# present.
zypper --non-interactive removelock coreutils || true
if [[ ${SP} -lt 5 ]]; then
# The mirrors for these earlier SLES SPs are no longer available
echo "ERROR: SP == $SP, but must be 5+" >&2
exit 1
fi

zypper --non-interactive rr --all
Expand All @@ -69,7 +68,12 @@ for MODULE in Basesystem Certifications Containers Desktop-Applications Developm
do
add_zypper_repos "Module-${MODULE}"
done
for PRODUCT in HA HPC SLED SLES SLES_SAP WE; do
PRODUCTS="HA SLED SLES SLES_SAP WE"
if [[ ${SP} -lt 6 ]]; then
# HPC is deprecated in SP6, but we want to include it for previous SPs
PRODUCTS="${PRODUCTS} HPC"
fi
for PRODUCT in $PRODUCTS; do
add_zypper_repos "Product-${PRODUCT}"
done
zypper --non-interactive ar --no-gpgcheck "${CSM_SLES_REPO_URL}" csm-sles
Expand Down

0 comments on commit 1e19300

Please sign in to comment.