Skip to content

Commit

Permalink
Automate Cilium and EKS Distro releases upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Mar 5, 2024
1 parent 2d41a83 commit 789665d
Show file tree
Hide file tree
Showing 15 changed files with 554 additions and 211 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ generate-staging-buildspec: | ensure-locale
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "emissary-ingress_emissary" "$(BASE_DIRECTORY)/projects/emissary-ingress/emissary/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "goharbor_harbor" "$(BASE_DIRECTORY)/projects/goharbor/harbor/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "aws_upgrader" "$(BASE_DIRECTORY)/projects/aws/upgrader/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "$(ALL_PROJECTS)" "$(BASE_DIRECTORY)/tools/version-tracker/buildspecs/upgrade.yml" "$(BASE_DIRECTORY)/buildspecs/upgrade-buildspec.yml" true EXCLUDE_FROM_UPGRADE_BUILDSPEC UPGRADE_BUILDSPECS false
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "$(ALL_PROJECTS)" "$(BASE_DIRECTORY)/tools/version-tracker/buildspecs/upgrade.yml" "$(BASE_DIRECTORY)/buildspecs/upgrade-buildspec.yml" true EXCLUDE_FROM_UPGRADE_BUILDSPEC UPGRADE_BUILDSPECS false buildspecs/upgrade-eks-distro-buildspec.yml

.PHONY: generate
generate: generate-project-list generate-staging-buildspec
Expand Down
14 changes: 14 additions & 0 deletions buildspecs/upgrade-eks-distro-buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.2

env:
secrets-manager:
GITHUB_TOKEN: "github-eks-distro-pr-bot:github-token"

phases:
pre_build:
commands:
- ./build/lib/setup.sh

build:
commands:
- make upgrade -C tools/version-tracker PROJECT=aws/eks-distro VERBOSITY=6
1 change: 0 additions & 1 deletion projects/cilium/cilium/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ BUILD_TARGETS=upload-artifacts
RELEASE_TARGETS=upload-artifacts

EXCLUDE_FROM_CHECKSUMS_BUILDSPEC=true
EXCLUDE_FROM_UPGRADE_BUILDSPEC=true

include $(BASE_DIRECTORY)/Common.mk

Expand Down
1 change: 0 additions & 1 deletion tools/version-tracker/SKIPPED_PROJECTS
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
cilium/cilium
57 changes: 57 additions & 0 deletions tools/version-tracker/buildspecs/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ batch:
variables:
PROJECT_PATH: projects/cert-manager/cert-manager
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/cert-manager.cert-manager
- identifier: cilium_cilium
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
PROJECT_PATH: projects/cilium/cilium
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/cilium.cilium
- identifier: containerd_containerd_linux_amd64
env:
type: LINUX_CONTAINER
Expand Down Expand Up @@ -348,6 +355,56 @@ batch:
variables:
PROJECT_PATH: projects/vmware/govmomi
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/vmware.govmomi
- identifier: final_stage
buildspec: buildspecs/upgrade-eks-distro-buildspec.yml
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
depend-on:
- apache_cloudstack_cloudmonkey
- aquasecurity_harbor_scanner_trivy
- aquasecurity_trivy
- aws_etcdadm_bootstrap_provider
- aws_etcdadm_controller
- aws_rolesanywhere_credential_helper
- aws_observability_aws_otel_collector
- brancz_kube_rbac_proxy
- cert_manager_cert_manager
- cilium_cilium
- containerd_containerd_linux_amd64
- containerd_containerd_linux_arm64
- distribution_distribution
- emissary_ingress_emissary_linux_amd64
- emissary_ingress_emissary_linux_arm64
- fluxcd_flux2
- fluxcd_helm_controller
- fluxcd_kustomize_controller
- fluxcd_notification_controller
- fluxcd_source_controller
- goharbor_harbor_linux_amd64
- goharbor_harbor_linux_arm64
- helm_helm
- kube_vip_kube_vip
- kubernetes_sigs_cluster_api
- kubernetes_sigs_cluster_api_provider_cloudstack
- kubernetes_sigs_cluster_api_provider_vsphere
- kubernetes_sigs_cri_tools
- kubernetes_sigs_image_builder_bottlerocket_1_25_upgrade_buildspec
- kubernetes_sigs_image_builder_bottlerocket_1_26_upgrade_buildspec
- kubernetes_sigs_image_builder_bottlerocket_1_27_upgrade_buildspec
- kubernetes_sigs_image_builder_bottlerocket_1_28_upgrade_buildspec
- kubernetes_sigs_image_builder_bottlerocket_1_29_upgrade_buildspec
- kubernetes_sigs_kind
- metallb_metallb
- nutanix_cloud_native_cloud_provider_nutanix
- nutanix_cloud_native_cluster_api_provider_nutanix
- opencontainers_runc_linux_amd64
- opencontainers_runc_linux_arm64
- prometheus_node_exporter
- prometheus_prometheus
- rancher_local_path_provisioner
- replicatedhq_troubleshoot
- vmware_govmomi
version: 0.2
env:
secrets-manager:
Expand Down
4 changes: 3 additions & 1 deletion tools/version-tracker/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ go 1.20

require (
github.com/aws/eks-anywhere v0.18.3
github.com/ghodss/yaml v1.0.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.4
github.com/google/go-github/v53 v53.2.0
github.com/pelletier/go-toml/v2 v2.0.8
github.com/rodaine/table v1.1.0
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
Expand All @@ -34,7 +36,6 @@ require (
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
Expand All @@ -57,4 +58,5 @@ require (
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
4 changes: 4 additions & 0 deletions tools/version-tracker/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
Expand Down Expand Up @@ -608,6 +610,8 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
2 changes: 1 addition & 1 deletion tools/version-tracker/pkg/commands/display/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Run(displayOptions *types.DisplayOptions) error {
var projectsList types.ProjectsList
err = yaml.Unmarshal(contents, &projectsList)
if err != nil {
return fmt.Errorf("unmarshaling upstream projects tracker file to YAML: %v", err)
return fmt.Errorf("unmarshalling upstream projects tracker file: %v", err)
}

var projectVersionInfoList []types.ProjectVersionInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Run() error {
var projectsList types.ProjectsList
err = yaml.Unmarshal(contents, &projectsList)
if err != nil {
return fmt.Errorf("unmarshaling upstream projects tracker file to YAML: %v", err)
return fmt.Errorf("unmarshalling upstream projects tracker file: %v", err)
}

var projectVersionInfoList []types.ProjectVersionInfo
Expand Down
Loading

0 comments on commit 789665d

Please sign in to comment.