Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Required upgrade for circleci #3596

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

kingdonb
Copy link
Member

@kingdonb kingdonb commented Mar 28, 2022

Fix #3592

We are deprecating Ubuntu 16.04-based machine images on CircleCI in preparation for an EOL on Tuesday, May 31

(Replaces #3591)

The reason for a change in Makefile is that newer CircleCI images effectively prohibit us from overriding GOPATH in the environment block of .circleci/config.yml – the GOPATH is set to have two directories by default, we can't override it, and only the first is used for inferring a default GOBIN.

I am not certain if allowing GOPATH to be set as defaulted can have any other negative side-effects, but this seems to be the least impact change possible that will allow us to go on building after May 31.

Tested a few different approaches to solving this on my fork at kingdonb/flux and pretty much settled that other approaches have drawbacks that make this the best option. I experimented with using an orb called persist-env and I think that would be rejected for security concerns (though it also worked to solve the issue, when I bypassed a security warning.)

Those tests are on my personal fork, I have not bypassed any security warnings for the Flux PR to merge.

We are deprecating Ubuntu 16.04-based machine images on CircleCI in preparation for an EOL on Tuesday, May 31

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
@kingdonb
Copy link
Member Author

The build is passing again, with this PR. I will make some PRs to resolve any outstanding security issues that I can pick up and resolve easily in the base image, then prepare the next release.

I'm not sure if we can move to alpine 3.15, but the alpine 3.14 support with security updates is still good for 1 year + so, it should not be a concern in the short-term.

@@ -22,7 +22,7 @@ ifeq ($(ARCH),)
endif
CURRENT_OS=$(shell go env GOOS)
CURRENT_OS_ARCH=$(shell echo $(CURRENT_OS)-`go env GOARCH`)
GOBIN?=$(shell echo `go env GOPATH`/bin)
GOBIN?=$(shell echo `go env GOPATH|cut -d: -f1`/bin)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It's probably a simple one-line change"

^ Me, three weeks ago. (Yes it was! But how does one know which line needs to change? The error was: https://app.circleci.com/pipelines/github/fluxcd/flux/976/workflows/dd384c61-c331-4a9b-9154-d3ea5dd872af/jobs/11947?invite=true#step-107-132

Makefile:40: *** target pattern contains no '%'.  Stop.

FFS... I think we might want to consider again modernizing the CircleCI / moving off and adopting GitHub Actions for Flux v1, as originally proposed in #2944, now that I am more familiar with our build tooling and with GitHub Actions, I could consider reopening that issue here.)

Not today, this one-line kludge means we can keep using it for now.

@kingdonb kingdonb added this to the 1.25.0 milestone Mar 29, 2022
@kingdonb
Copy link
Member Author

@stefanprodan Please review and 👍 if you have a moment! 🙇

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @kingdonb

@stefanprodan stefanprodan added the build About the build or test scaffolding label Mar 29, 2022
@stefanprodan stefanprodan merged commit 96c5d2f into fluxcd:master Mar 29, 2022
@kingdonb kingdonb deleted the circleci-upgrade-2 branch March 30, 2022 18:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build About the build or test scaffolding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CircleCI base image 1604 is outdated and will retire soon
3 participants