Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infrastructure for generating the golang-debian image using upstream binaries #1474

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

rcrozean
Copy link
Member

Issue #, if available:

Description of changes:
These changes were tested using the new make local-images-upstream-bins which is identical to the final call except PUSH_IMAGES=false. Both of these based of the make targets for building the current debian images with new variables and scripts used pulling upstream binaries instead of the EKS Go s3 images previously generated.

Output from the make local-images-upstream-bins command calling the new get_upstream_golang.sh. This script checks the builder-base files for referencing which version of golang the debian images should use. From here the Makefile and Dockerfile create the relevant image using the tags. Using the existing postsubmits we can trigger off a merge of the eks-distro-base/golang_versions.yaml (this file should be used as it will be updated with the same automation that update the builder-base/versions.yaml but only will be updated when golang versions are updated), instead of the docker/debianBase/RELEASE file.

[...]/eks-distro-build-tooling/projects/golang/go/scripts/get_upstream_golang.sh [...]/eks-distro-build-tooling/projects/golang/go/1.22/archives/ 1.22.5
+ set -e
+ set -o pipefail
+++ dirname [...]/eks-distro-build-tooling/projects/golang/go/scripts/get_upstream_golang.sh
++ cd [...]/eks-distro-build-tooling/projects/golang/go/scripts
++ pwd -P
+ SCRIPT_ROOT=[...]/eks-distro-build-tooling/projects/golang/go/scripts
++ git rev-parse --show-toplevel
+ BASE_DIRECTORY=[...]/eks-distro-build-tooling
+ GO_PREFIX=go
+ ARCHITECTURE=linux/amd64
+ OUTPUT_DIR=[...]/eks-distro-build-tooling/projects/golang/go/1.22/archives/
+ GO_BIN_VERSION=1.22.5
+ source [...]/eks-distro-build-tooling/builder-base/scripts/common_vars.sh
++ set -e
++ set -o pipefail
++ TARGETARCH=amd64
++ USR=/usr
++ USR_LOCAL=/usr/local
++ USR_BIN=/usr/bin
++ USR_LOCAL_BIN=/usr/local/bin
++ BASE_DIR=
++ IS_AL23=false
++ '[' -f /etc/yum.repos.d/amazonlinux.repo ']'
++ '[' false '!=' false ']'
++ mkdir -p /usr/bin /usr/local/bin
+ build::go::download 1.22.5 [...]/eks-distro-build-tooling/projects/golang/go/1.22/archives/ linux/amd64
+ local version=1.22.5
+ local outputDir=[...]/eks-distro-build-tooling/projects/golang/go/1.22/archives/
+ local archs=linux/amd64
+ for arch in ${archs/,/ }
+ local filename=[...]/eks-distro-build-tooling/projects/golang/go/1.22/archives//linux/amd64/go1.22.5.linux-amd64.tar.gz
+ '[' '!' -f [...]/eks-distro-build-tooling/projects/golang/go/1.22/archives//linux/amd64/go1.22.5.linux-amd64.tar.gz ']'
...

Relevant output from buildkit and docker:

/Users/rcrozean/repos/rcrozean/eks-distro-build-tooling/scripts/buildkit.sh \
		build \
		--frontend dockerfile.v0 \
		--opt platform=linux/amd64 \
		--opt build-arg:GOLANG_ARCHIVE_PATH=linux/amd64/go1.22.5.linux-amd64.tar.gz \
		--local dockerfile=/Users/rcrozean/repos/rcrozean/eks-distro-build-tooling/projects/golang/go/docker/debianBase \
		--local context=/Users/rcrozean/repos/rcrozean/eks-distro-build-tooling/projects/golang/go/1.22/archives \
		--progress plain \
		--output type=image,oci-mediatypes=true,\"name=.dkr.ecr..amazonaws.com/golang-debian:1.22.5-5-25,.dkr.ecr..amazonaws.com/golang-debian:1.22.5\",push=false
...
#11 14.15 + chmod -R 777 /go
#11 14.15 + go version
#11 14.15 go version go1.22.5 linux/amd64
#11 DONE 14.8s
...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions bot added golang go Pull requests that update Go code projects Updates or changes to the projects being built labels Jul 25, 2024
@rcrozean
Copy link
Member Author

PR for updating relevant Prowjobs aws/eks-distro-prow-jobs#621

@rcrozean
Copy link
Member Author

/retest

@eks-distro-bot
Copy link
Collaborator

eks-distro-bot commented Jul 30, 2024

@rcrozean: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
golang-1-20-tooling-presubmit d8a1b27 link true /test golang-1-20-tooling-presubmit

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rcrozean
Copy link
Member Author

/retest

@vineeth-bandi
Copy link
Member

/lgtm

@rcrozean
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rcrozean

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rcrozean rcrozean merged commit 88e3931 into aws:main Jul 30, 2024
5 of 7 checks passed
@rcrozean rcrozean deleted the moveGoDebian branch July 30, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved go Pull requests that update Go code golang lgtm projects Updates or changes to the projects being built size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants