Skip to content

ci/cd: fix codesigning on mac/arm cloud agent - #4152

Merged
aarzilli merged 3 commits into
go-delve:masterfrom
vietage:mac-arm-cloud-build
Sep 15, 2025
Merged

aarzilli merged 3 commits into
go-delve:masterfrom
vietage:mac-arm-cloud-build

Conversation

@vietage

@vietage vietage commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

TeamCity build fails on Mac arm cloud agent because codesigning hangs on a password prompt in GUI. This commit changes how we generate a certificate and how we import it into a keychain so that it does not prompt passwords in GUI.

TeamCity build fails on Mac arm cloud agent because codesigning hangs on a password prompt in GUI. This commit changes how we generate a certificate and how we import it into a keychain so that it does not prompt passwords in GUI.
@aarzilli

Copy link
Copy Markdown
Member

The tests will pass like this because the certificate is only necessary for the macOS native backend, which we don't test (it's been broken for a long time). However if someone ever were to fix it the certificate would need to be specifically installed in the system keychain, so changing gencert.sh to install the certificate somewhere else is just breaking the backend further.

I think we should just add something like this to checkCert in _scripts/make.go:

if os.Getenv("CI") != "" {
        return true
}

the rest probably works.

@vietage

vietage commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

Yes, it is way easier to disable codesigning at all if you do not need it.

We still need somehow pass CI=true to the pipeline. I've modified TC config and added CI=true for Mac build, but it is tricky to test because we need these changes in VCS in order for TeamCity to apply them. So I only tested this approach with custom build with manually provided CI=true env variable.

And looks like Linux/Amd64 build is flaky and sometimes fails with"cannot find git" message. I've re-run the build again and it passed.

@aarzilli

Copy link
Copy Markdown
Member

And looks like Linux/Amd64 build is flaky and sometimes fails with"cannot find git" message. I've re-run the build again and it passed.

That's not how it fails. If you download the full log you will see that there is an error from Go: exec: WaitDelay expired before I/O complete. The way teamcity organizes the output hides it. I have no idea what the cause is.

@aarzilli aarzilli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@aarzilli
aarzilli merged commit 213eb97 into go-delve:master Sep 15, 2025
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.

2 participants