Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Setup the shipper's build, lint, and CI process #4

Closed
Tracked by #15
cmacknz opened this issue Mar 16, 2022 · 5 comments
Closed
Tracked by #15

Setup the shipper's build, lint, and CI process #4

cmacknz opened this issue Mar 16, 2022 · 5 comments
Assignees
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team v8.3.0

Comments

@cmacknz
Copy link
Member

cmacknz commented Mar 16, 2022

Setup the shipper repository with the standard mage targets (check, build, unitTest, etc.). The mage and lint targets should match those setup for https://github.com/elastic/elastic-agent-libs and use the same golangci-lint configuration. The lint step in CI should use a Github action, see https://github.com/elastic/beats/pull/30985/files for the setup.

Jenkins should be configured to run the lint, build, and test steps on each supported platform. The output of the build should initially be an elastic-agent-shipper binary, which can start as an empty main.go file. The https://github.com/elastic/elastic-agent repository can be used as a reference for a build process that produces a binary artifact.

Automated Go version bumps should be configured: https://github.com/elastic/observability-robots/blob/main/docs/bump-versions.md#go-bump

The CI onboarding Jenkins job has already been run, resulting in the following PRs that should be reviewed and merged:

We should attempt to reuse the mage targets from the elastic agent where possible: elastic/elastic-agent#321

@fearful-symmetry
Copy link
Contributor

Now that the initial PR is merged, we have a basic CI and a handful of custom and imported mage targets.

The biggest issue is that a lot of the glue code we'd want to have in the shipper currently lives in the the elastic-agent repo in a non-importable form. I'm not a big fan of copy-and-pasting that much code, so we need to look into migrating a lot of those existing targets and helper code back into elastic-agent-libs

@fearful-symmetry
Copy link
Contributor

I think we can close this? The shipper now has notice and all the other needed targets. There's still some rough edges, but I don't think we're actually missing anything?

@cmacknz
Copy link
Member Author

cmacknz commented Apr 26, 2022

I think we might be missing the automation to bump the Go version automatically: https://github.com/elastic/observability-robots/blob/main/docs/teams/ci/bump-versions.md#go-bump

Specifically https://github.com/elastic/apm-pipeline-library/blob/main/.ci/.bump-go-release-version.yml

We are missing that for a few of the new repositories it seems.

@fearful-symmetry
Copy link
Contributor

Hah, I didn't even know that was a thing.

@fearful-symmetry
Copy link
Contributor

@cmacknz alright, we have the automation for the version bump set up.

@cmacknz cmacknz closed this as completed May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team v8.3.0
Projects
None yet
Development

No branches or pull requests

3 participants