Closed hasheddan closed 7 months ago
Thanks, noted! We're currently discussing this; Drone is, currently, our (Packet's) preferred (but not the only one in-use) solution, but Jenkins is absolutely on the table, and seems sensible to me (and I believe @jasmingacic concurred) to keep consistent with the other stacks, if at all possible. I'll keep you updated.
@jmarhee If that's the case then let's proceed with Jenkins?
v0.0.2 included the common Crossplane Jenkinsfile
, Makefile
, and build
sub-module, but this has not been wired up to a Jenkins instance.
That said, I'm thinking Drone or Github Workflows (perhaps with GoReleaser) may be a better fit for this project since it doesn't live under the https://github.com/crossplane org.
The manual process that I used in the last release was modeled after:
git tag -s v0.0.2
kubectl crossplane package build
kubectl crossplane package publish
I deviated a bit because the publish
command expects the following to exist (and they don't):
For now, the image is only published as amd64. An automation approach should cover multiple architectures (one project doing this is https://github.com/pomerium/pomerium/tree/master/.github)
I don't see why these extra repositories should be necessary, providers like provider-gcp combine the amd64 and arm64 images into a single repository.
The package was also published to https://upbound.io/registry/packet/crossplane-provider-packet.
I've been using GitHub Actions recently and I'm fairly confident we can take that approach, especially with https://github.com/docker/setup-buildx-action#about, https://github.com/goreleaser/goreleaser-action, and https://github.com/displague/packet-actions-example
@displague let me know if I can provide any assistance as you get those set up :+1:
We now have a build pipeline in place, which includes E2E testing (building the provider and installing it in a Kind cluster).
We do not create Equinix Metal infrastructure with this E2E testing currently, I think the need for that can be determined in a new issue when the need arises.
What we will need to close out this issue is a release pipeline. The release pipeline will need to produce images for multiple architectures (preferably as a single multi-arch image, not requiring multiple images).
I may run goreleaser by hand again so that we can get recent revisions published in Docker (/u/equinix) and the Upbound registry (also under the Equinix org).
My thrown together publishing command-line, for now, is:
ver=v0.0.4;
git tag -m $ver -s $ver
git push --tags origin $ver
make
make -j2 build.all
make img.release.build
for tag in $ver latest; do
for img in "" "-controller"; do
target=equinix/crossplane-provider-equinix-metal$img:$tag;
for root in "" "registry.upbound.io/"; do
docker tag equinix/crossplane-provider-equinix-metal$img-amd64:$ver $root$target;
docker push $root$target;
done;
done;
done
(update 2020-12-15: registry.upbound.io/ now hosts provider-equinix-metal* without the crossplane- prefix)
Several of the new and existing upstream projects have adopted GitHub Actions: https://github.com/crossplane-contrib/provider-in-cluster/tree/master/.github/workflows
These workflows look like they could be a direct drop-in, except for the expectations around Upbound and S3 creds secrets.
Now that this project is in the github.com/crossplane-contribs GH org, it is possible to take advantage of community publishing pipelines and credentials.
We'll need to figure out if the existing Docker images (equinix/crossplane-provider-equinix-metal and registry.upbound.io/equinix/provider-equinix-metal) will continue to be the primary images.
Closing for #69
Build pipeline is present in https://github.com/crossplane-contrib/provider-jet-equinix
The tooling in this repo is configured for a crossplaneio stack release, which is opinionated about using tools such as Jenkins and Sonar. It will need to be updated with any testing / publishing tools that are suitable for Packet.
cc @jmarhee @jasmingacic