diff --git a/CHANGELOG.md b/CHANGELOG.md index 33172cf3..13e4a043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.32.6] - 2024-10-08 + +### Changed +- Updated the version of `kubectl` included in `cray-sat` container to 1.24 to + match the version of Kubernetes included in CSM 1.6. + ## [3.32.5] - 2024-10-03 ### Added diff --git a/Dockerfile b/Dockerfile index b2c075ab..687e72e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,6 +69,7 @@ COPY docs/man docs/man COPY tools tools RUN --mount=type=secret,id=netrc,target=/root/.netrc \ + --mount=type=bind,source=node-images,target=/tmp/node-images \ pip3 install --no-cache-dir pip && \ pip3 install --no-cache-dir --timeout=300 . && \ ./config-docker-sat.sh diff --git a/Jenkinsfile.github b/Jenkinsfile.github index 0268a38b..2985cf0f 100644 --- a/Jenkinsfile.github +++ b/Jenkinsfile.github @@ -1,7 +1,7 @@ /* * MIT License * - * (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP + * (C) Copyright 2022-2024 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -45,6 +45,16 @@ pipeline { } stages { + stage('Checkout node-images repo for Kubernetes version') { + steps { + dir("node-images") { + git( + url: "https://github.com/Cray-HPE/node-images", branch: "main", + credentialsId: "jenkins-algol60-cray-hpe-github-integration" + ) + } + } + } stage('Run Unit Tests') { steps { sh 'make unittest' diff --git a/Makefile b/Makefile index 96b26328..a1dbbe1d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # MIT License # -# (C) Copyright 2022 Hewlett Packard Enterprise Development LP +# (C) Copyright 2022, 2024 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -34,13 +34,19 @@ endif all : unittest codestyle image -unittest: +# The node-images repo must be cloned to get the Kubernetes version, so we can +# install the matching version of kubectl in the cray-sat image. In the Jenkins +# pipeline, this is handled prior to running make +node-images: + git clone --branch main git@github.com:Cray-HPE/node-images.git node-images + +unittest: node-images $(DOCKER_BUILD) --target testing --tag $(TEST_TAG) docker run $(TEST_TAG) -codestyle: +codestyle: node-images $(DOCKER_BUILD) --target codestyle --tag $(CODESTYLE_TAG) docker run $(CODESTYLE_TAG) -image: +image: node-images $(DOCKER_BUILD) --tag $(DEFAULT_TAG) diff --git a/docker_scripts/config-docker-sat.sh b/docker_scripts/config-docker-sat.sh index 049a135c..64b5d0bf 100755 --- a/docker_scripts/config-docker-sat.sh +++ b/docker_scripts/config-docker-sat.sh @@ -2,7 +2,7 @@ # # MIT License # -# (C) Copyright 2020-2023 Hewlett Packard Enterprise Development LP +# (C) Copyright 2020-2024 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -27,10 +27,8 @@ LOGDIR=/var/log/cray/sat SATMANDIR=/usr/share/man/man8 -METAL_PROVISION_REPO="https://github.com/Cray-HPE/metal-provision.git" -METAL_PROVISION_DIR="metal-provision" -METAL_PROVISION_BASE_PACKAGES_PATH="group_vars/all.yml" -METAL_PROVISION_BRANCH="lts/csm-1.5" +NODE_IMAGES_DIR="/tmp/node-images" +NODE_IMAGES_BASE_PACKAGES_PATH="metal-provision/group_vars/all.yml" # create logging directory if [ ! -d "$LOGDIR" ]; then @@ -61,18 +59,13 @@ register-python-argcomplete sat > /usr/share/bash-completion/completions/sat echo "export PATH=$VIRTUAL_ENV/bin:\$PATH" > /etc/profile.d/sat_path.sh # install kubectl using same version used in ncn image -cd /sat -git clone $METAL_PROVISION_REPO $METAL_PROVISION_DIR -cd $METAL_PROVISION_DIR -git checkout $METAL_PROVISION_BRANCH - KUBERNETES_PULL_VERSION=$(python3 <&2 "Unable to determine version of kubectl to use from ${METAL_PROVISION_REPO}" + echo >&2 "Unable to determine version of kubectl to use from node-images repo" exit 1 fi