Skip to content

Commit

Permalink
CI: Generate package list after building kicbase (#19642)
Browse files Browse the repository at this point in the history
* CI: Generate package list after building kicbase

* rename package-list to os-package-list
  • Loading branch information
spowelljr authored Sep 17, 2024
1 parent ee137b8 commit fc40197
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hack/jenkins/kicbase_auto_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ source ./hack/jenkins/installers/check_install_linux_crons.sh
export GOBIN=/usr/local/go/bin
export PATH=$PATH:$GOBIN

generate_package_list() {
make
./out/minikube delete
./out/minikube start
./out/minikube ssh -- sudo dpkg -l --no-pager > hack/kicbase_version/os-package-list.txt
./out/minikube delete
}

# Let's make sure we have the newest kicbase reference
curl -L https://github.com/kubernetes/minikube/raw/master/pkg/drivers/kic/types.go --output types-head.go
# kicbase tags are of the form VERSION-TIMESTAMP-PR, so this grep finds that TIMESTAMP in the middle
Expand Down Expand Up @@ -100,6 +108,7 @@ if [ "$release" = false ]; then
git checkout -b ${ghprbPullAuthorLogin}-${ghprbSourceBranch} ${ghprbPullAuthorLogin}/${ghprbSourceBranch}

sed -i "s|Version = .*|Version = \"${KIC_VERSION}\"|;s|baseImageSHA = .*|baseImageSHA = \"${sha}\"|;s|gcrRepo = .*|gcrRepo = \"${GCR_REPO}\"|;s|dockerhubRepo = .*|dockerhubRepo = \"${DH_REPO}\"|" pkg/drivers/kic/types.go; make generate-docs;
generate_package_list

git commit -am "Updating kicbase image to ${KIC_VERSION}"
git push ${ghprbPullAuthorLogin} HEAD:${ghprbSourceBranch}
Expand All @@ -122,6 +131,7 @@ else

sed -i "s|Version = .*|Version = \"${KIC_VERSION}\"|;s|baseImageSHA = .*|baseImageSHA = \"${sha}\"|;s|gcrRepo = .*|gcrRepo = \"${GCR_REPO}\"|;s|dockerhubRepo = .*|dockerhubRepo = \"${DH_REPO}\"|" pkg/drivers/kic/types.go
make generate-docs
generate_package_list

git add pkg/drivers/kic/types.go site/content/en/docs/commands/start.md
git commit -m "Release: Update kicbase to ${KIC_VERSION}"
Expand Down
Loading

0 comments on commit fc40197

Please sign in to comment.