-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the cray-sat image build process to get the Kubernetes version from its new location in the node-images repository instead of the old version in the deprecated metal-provision repository. This is more involved than just changing the repository URL and path in the `docker_scripts/config-docker-sat.sh` script because the node-images repository is private in GitHub, but metal-provision was public. Thus we need to authenticate to GitHub when cloning this repository. This is best achieved through a `git` command in the Jenkinsfile. In order to continue supporting local builds, add a target to the `Makefile` that clones the node-images repository if it does not already exist. Use the `git` protocol instead of `https` to allow it to use the user's configured SSH keypair to authenticate when cloning the repo. In either case, the node-images repository gets bind-mounted during the `RUN` command, so that it can be accessed by the `config-docker-sat.sh` script. Test Description: Built the image locally using `make image`. Then ran the container and executed `kubectl version` to verify the version of the `kubectl` client that was installed. Pushed to Jenkins and verified that the Jenkins pipeline worked. (cherry picked from commit 040f41c) Co-authored-by: Ryan Haasken <[email protected]>
- Loading branch information
1 parent
41a715e
commit 5b697cc
Showing
5 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 [email protected]: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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters