crossplane-contrib / provider-kafka

Crossplane provider for Kafka
Apache License 2.0
27 stars 30 forks source link

Use bundled packages and update publishing in CI #44

Closed jastang closed 1 year ago

jastang commented 1 year ago

Signed-off-by: Jason Tang jason@upbound.io

Description of your changes

Onboard provider-kafka to the new repositories:

xref https://github.com/crossplane/crossplane/issues/3350

I have:

How has this code been tested

Build

➜  provider-kafka git:(main) ✗ GO=go1.17.3 VERSION=v0.2.0 make build.all
11:37:20 [ .. ] verify go modules dependencies have expected content
all modules verified
11:37:22 [ OK ] go modules dependencies verified
11:37:22 [ .. ] go build linux_amd64
11:37:23 [ OK ] go build linux_amd64
11:37:23 [ .. ] go build linux_arm64
11:37:23 [ OK ] go build linux_arm64
11:37:24 [ .. ] docker build build-8bff0c02/provider-kafka-amd64
[+] Building 1.3s (7/7) FINISHED                                                                                                                                                                            
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
 => => transferring dockerfile: 304B                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [internal] load metadata for gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b                                                                      0.3s
 => CACHED [1/2] FROM gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                      0.7s
 => => transferring context: 40.28MB                                                                                                                                                                   0.7s
 => [2/2] ADD bin/linux_amd64/provider /usr/local/bin/crossplane-kafka-provider                                                                                                                        0.1s
 => exporting to image                                                                                                                                                                                 0.1s
 => => exporting layers                                                                                                                                                                                0.1s
 => => writing image sha256:8ead1bd725032b4c36eada266b2099675440bd211e3b1f76ecaa6cb0135ddec2                                                                                                           0.0s
 => => naming to docker.io/build-8bff0c02/provider-kafka-amd64                                                                                                                                         0.0s
11:37:26 [ OK ] docker build build-8bff0c02/provider-kafka-amd64
11:37:26 [ .. ] Building package provider-kafka-v0.2.0.xpkg for linux_amd64
xpkg saved to /Users/jasontang/workspace/provider-kafka/_output/xpkg/linux_amd64/provider-kafka-v0.2.0.xpkg
11:37:28 [ OK ] Built package provider-kafka-v0.2.0.xpkg for linux_amd64
11:37:28 [ .. ] docker build build-8bff0c02/provider-kafka-arm64
[+] Building 1.0s (7/7) FINISHED                                                                                                                                                                            
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
 => => transferring dockerfile: 304B                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [internal] load metadata for gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b                                                                      0.0s
 => [internal] load build context                                                                                                                                                                      0.8s
 => => transferring context: 40.31MB                                                                                                                                                                   0.8s
 => CACHED [1/2] FROM gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b                                                                                 0.0s
 => [2/2] ADD bin/linux_arm64/provider /usr/local/bin/crossplane-kafka-provider                                                                                                                        0.1s
 => exporting to image                                                                                                                                                                                 0.1s
 => => exporting layers                                                                                                                                                                                0.1s
 => => writing image sha256:2b886b5e51113050f676ca31290a75661f4f1b9d63288bb4054d067a2165ea35                                                                                                           0.0s
 => => naming to docker.io/build-8bff0c02/provider-kafka-arm64                                                                                                                                         0.0s
11:37:29 [ OK ] docker build build-8bff0c02/provider-kafka-arm64
11:37:29 [ .. ] Building package provider-kafka-v0.2.0.xpkg for linux_arm64
xpkg saved to /Users/jasontang/workspace/provider-kafka/_output/xpkg/linux_arm64/provider-kafka-v0.2.0.xpkg
11:37:31 [ OK ] Built package provider-kafka-v0.2.0.xpkg for linux_arm64

Publish

➜  provider-kafka git:(main) ✗ GO=go1.17.3 VERSION=v0.2.0 BRANCH_NAME=main make -j2 publish
11:39:26 [ .. ] Pushing package xpkg.upbound.io/jastang/provider-kafka:v0.2.0
11:39:26 [ .. ] Skipping image publish for docker.io/provider-kafka:v0.2.0
Publish is deferred to xpkg machinery
11:39:26 [ OK ] Image publish skipped for docker.io/provider-kafka:v0.2.0
xpkg pushed to xpkg.upbound.io/jastang/provider-kafka:v0.2.0
11:39:42 [ OK ] Pushed package xpkg.upbound.io/jastang/provider-kafka:v0.2.0

Verify

➜  provider-kafka git:(main) ✗ crane manifest xpkg.upbound.io/jastang/provider-kafka:v0.2.0 | jq .
{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
      "size": 1004,
      "digest": "sha256:a8c1e6d0b962391f9b2f3002ba1674eaebbc8cd1b385acccb4af70dc8b872d39",
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
      "size": 1004,
      "digest": "sha256:0ec2b9a16aabf6a6a8be76b1a6c6b1ff94b8cd18e8a6e70faeba0f15352103c9",
      "platform": {
        "architecture": "arm64",
        "os": "linux"
      }
    }
  ]
}