Page MenuHomePhabricator

[keyserver] Buildkite CI for Docker keyserver
ClosedPublic

Authored by ashoat on Jun 6 2022, 2:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 8:48 PM
Unknown Object (File)
Tue, Jun 18, 11:29 AM
Unknown Object (File)
Tue, Jun 18, 11:29 AM
Unknown Object (File)
Tue, Jun 18, 11:29 AM
Unknown Object (File)
Tue, Jun 18, 11:29 AM
Unknown Object (File)
Mon, Jun 17, 3:17 PM
Unknown Object (File)
Mon, Jun 17, 3:17 PM
Unknown Object (File)
Mon, Jun 17, 3:17 PM

Details

Summary

Linear task: ENG-997

Test Plan

This diff is actually the test!

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested review of this revision.Jun 6 2022, 2:07 AM

Need a Harbormaster config to test this, but I can't access credential K2

From CI machine:

open /home/atul/.buildkite-agent/builds/ci-spring-1/comm/docker-keyserver/keyserver/.env: no such file or directory

From local machine:

atul@atuls-MacBook-Pro comm % cd keyserver && bash/dc.sh build --no-cache
WARN[0000] The "COMM_MYSQL_DATABASE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "COMM_MYSQL_USER" variable is not set. Defaulting to a blank string. 
WARN[0000] The "COMM_MYSQL_PASSWORD" variable is not set. Defaulting to a blank string. 
open /Users/atul/comm/keyserver/.env: no such file or directory

However, after creating an empty .env file in keyserver things worked as expected.


Didn't spend time investigating the root cause, but guessing it's because the env_file is specified as .env in keyserver/docker-compose.yml and it expects the file to exist? Maybe we could include a placeholder .env in the repo and .gitignore it (which we're actually already doing)?

I'd rather avoid the placeholder... I think it's weird to have files included in the repo but in the .gitignore. Just putting a touch command in there makes sense to me, I'll update the diff

.buildkite/docker_keyserver.yml
3 ↗(On Diff #13346)

Separately, seems like maybe I should disable the --no-cache here? Given we don't do it for other Docker builds, and Buildkite runners are a scarce resource

.buildkite/docker_keyserver.yml
3 ↗(On Diff #13346)

I think —no-cache for this is actually fine since it only took ~4 minutes (https://buildkite.com/comm/docker-keyserver/builds/6) whereas the services builds took ~33min from scratch earlier today (https://buildkite.com/comm/services-ci/builds/2756)

Triggering build again in hopes that it will show up in Phabricator

Woohoo it worked!! After this lands, I just need to update https://buildkite.com/comm/docker-keyserver/steps to:

steps:
  - command: 'buildkite-agent pipeline upload .buildkite/docker_keyserver.yml'
This revision is now accepted and ready to land.Jun 8 2022, 1:14 AM

Woohoo it worked!! After this lands, I just need to update https://buildkite.com/comm/docker-keyserver/steps to:

steps:
  - command: 'buildkite-agent pipeline upload .buildkite/docker_keyserver.yml'

Done