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

Relocate agent #726

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Relocate agent #726

merged 2 commits into from
Apr 23, 2024

Conversation

edigaryev
Copy link
Contributor

@edigaryev edigaryev commented Apr 23, 2024

The first commit contains a lost of changes and can be reproduced by running the following commands:

git clone https://github.com/cirruslabs/cirrus-ci-agent.git agent
mkdir internal/agent
mv agent/cmd/agent/* agent/internal/* internal/agent/
mv agent/api agent/pkg/grpchelper pkg/
find cmd/ internal/ pkg/ -type f -print0 | xargs -0 sed -i '' -e 's|github.com/cirruslabs/cirrus-ci-agent/internal/|github.com/cirruslabs/cirrus-cli/internal/agent/|g'
find cmd/ internal/ pkg/ -type f -print0 | xargs -0 sed -i '' -e 's|github.com/cirruslabs/cirrus-ci-agent/api"|github.com/cirruslabs/cirrus-cli/pkg/api"|g'
find cmd/ internal/ pkg/ -type f -print0 | xargs -0 sed -i '' -e 's|github.com/cirruslabs/cirrus-ci-agent/pkg/grpchelper"|github.com/cirruslabs/cirrus-cli/pkg/grpchelper"|g'
rm -rf agent
go mod tidy
go fmt ./...

The second commit is small and only accounts for manual changes.

Unfortunately this also introduces a chicken-and-egg problem where we cannot fully stop depending on the cirruslabs/cirrus-ci-agent repository until we make a new release in this one, here's an example:

windowsAgentURL := fmt.Sprintf("https://github.com/cirruslabs/cirrus-ci-agent/releases/"+
"download/v%s/agent-windows-amd64.exe", DefaultAgentVersion)

I also had to disable the golangci-lint for internal/agent/ directory because the CLI's linter settings are more strict.

Dockerfile Show resolved Hide resolved
@fkorotkov fkorotkov merged commit 989bbbe into master Apr 23, 2024
8 checks passed
@fkorotkov fkorotkov deleted the relocate-agent branch April 23, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants