pact-foundation / pact-ruby-cli

Amalgamated Pact Ruby CLI
https://pact.io
MIT License
12 stars 15 forks source link

V1.x Release #117

Closed YOU54F closed 7 months ago

YOU54F commented 1 year ago

Hey all,

Just to let you know we will be promoting to a V1.x release very shortly,

It will do the following at the moment

YOU54F commented 12 months ago

So,

  1. first off, I am a numpty. I did a minor release, rather than a major!

  2. For reasons I cannot fathom at the moment, the only one now with a multi arches, is the major tag 0

Screenshot 2023-09-08 at 19 32 05

It doesn't make sense as the script is running the same command , albeit with a different tag, each time

https://github.com/pact-foundation/pact-ruby-cli/blob/master/script/release-workflow/docker-push.sh

YOU54F commented 12 months ago

Pulled the changes into my fork, released, and the manifests are correct 🤔

Screenshot 2023-09-11 at 17 21 53
YOU54F commented 12 months ago

Right, so it doesn't look like the version increment is considered in this release workflow, so regardless of the user input, its defaulting to minor

  1. on release workflow, we set an increment, this might be set manually when dispatching the workflow, or automatically by the gem update, which invokes the release workflow
  2. we pass it through to script/release-workflow/run.sh
  3. The env vars are setup in this script . ${script_dir}/set-env-vars.sh
  4. set-env-vars.sh calls out to script/release-workflow/next-docker-tag.sh to get the docker tag name
  5. the docker tag is computed and constructed using the version from lib/pact/cli/version.rb

    How should we compute the Docker tag version?

    Should we record all the changes, simply, in the pact cli gem version?

    • major/minor/patch update to pact cli gem version depending on the update of a packaged pact-* gem
    • triggers a release of the workflow, with the major/minor/patch INCREMENT set, as triggered by the underlying pact-* gem update
    • a major/minor/patch update to the docker image, but not the gem, should trigger a pact cli gem version update
YOU54F commented 12 months ago

hmm

snags.

  1. incorrect referencing of pact broker here

do we want something like

  if [ -n "$INCREMENT" ]; then
    bundle exec bump $INCREMENT --no-commit --replace-in $PWD/lib/pact/cli/version.rb > /dev/null
  fi

in

https://github.com/pact-foundation/pact-ruby-cli/blob/7ea69c6b61a261adad61cbda6d152322c4507018/script/release-workflow/next-docker-tag.sh#L8

and commit back the updated versions, as part of the docker release, which will catch docker release changes, and also releases triggered by gem updates

YOU54F commented 12 months ago

also wat?! These were the same codebases albeit in different forks. - still not publishing multi manifests correctly

Screenshot 2023-09-11 at 20 27 11

but did on the fork see https://github.com/pact-foundation/pact-ruby-cli/issues/117#issuecomment-1714206821

YOU54F commented 9 months ago

Published 0.56.0.5 and oddly, one of the pushes gets associated with @bethesque account, but the other two which are published linux/amd64 only are associated with the pactfoundation account.

image

This doesn't really make sense, as there is only one set of credentials (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN which are set at the pactfoundation org level, so not sure why Beth's account is being picked up here)

I tested out again on my fork, but forget there was a hard-coded org name, so I published to the pact-foundation account.

This has published the multi-manifests across all builds, with no other code changes. Could it be that we just need to update the org wide docker account and token in gh actions. Such confuse 😬

Screenshot 2023-11-13 at 15 37 30

bethesque commented 9 months ago

I'm as confused as you are, if not more.

YOU54F commented 7 months ago

So I've worked it out now, there was an automated build trigger in docker, which was clobbering the multi-manifest builds, with an amd64 only. Disabled now in Dockerhub and pushed out a patch version to go out.

image

What a doozy! I thought I was literally going mad.

image

image