Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add helm release management command #361

Merged
merged 2 commits into from Oct 5, 2020

Conversation

diegodelemos
Copy link
Member

@diegodelemos diegodelemos commented Aug 5, 2020

Pending:

  • Move push to Helm repository from GH actions to this CLI

@diegodelemos diegodelemos self-assigned this Aug 5, 2020
@diegodelemos diegodelemos added this to In work in v0.7.0 Aug 5, 2020
@diegodelemos diegodelemos force-pushed the 331-tags-and-versions branch 3 times, most recently from 987881f to edba0c7 Compare August 5, 2020 11:40
@diegodelemos diegodelemos changed the title release: add helm release management command cli: add helm release management command Aug 5, 2020
@diegodelemos diegodelemos removed this from In work in v0.7.0 Aug 5, 2020
@diegodelemos diegodelemos force-pushed the 331-tags-and-versions branch 2 times, most recently from 867e9ab to 4829270 Compare August 12, 2020 13:19
next_version=version,
)

ctx.invoke(git_create_release_commit_command, component=["reana"], version=version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether these two should be part of the release-helm command. E.g. making PRs is not part of release-pypi and release-docker commands, so perhaps let's not use them here as well? That said, the first command to create release commit is perhaps good to keep, but creating the PR is perhaps too much; need local testing first?

f"{user}/{component}:{get_component_version_as_semver2(component)}"
)

if remaining_docker_releases:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiborsimko currently this check causes the following error:

reana-dev release-helm                                                                                                              [5:34:17]
[2020-09-02T17:34:17] reana-job-controller: git describe --tags
[2020-09-02T17:34:17] reana-server: git describe --tags
[2020-09-02T17:34:18] reana-workflow-controller: git describe --tags
The following components are missing to be released:
reana-auth-vomsproxy
reana-ui
reana-message-broker
reana-workflow-engine-cwl
reana-workflow-engine-serial
reana-workflow-engine-yadage

Because we do not have tags for previous versions. Should we make this check optional? Or should we create tags for the previous releases?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we do have tag 0.7.0a1 for r-w-e-serial for example?

)

if publish:
package_and_publish_helm_chart(user, version, component)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I've ended up with, reana-dev release-helm would do too many things.

I think we could split it as:

  • Until line 330 (updating values.yaml and bumping version, similar to reana-dev git-upgrade-shared-modules but for Helm and docker images) we could have a new command e.g. reana-dev helm-upgrade-components or similar
  • Then one would run reana-dev git-create-release-commit
  • Lastly, the true reana-dev release-helm would just consist of package_and_publish_helm_chart

What do you think?

@diegodelemos diegodelemos force-pushed the 331-tags-and-versions branch 3 times, most recently from 2d289ee to 6e05a78 Compare September 16, 2020 11:21
@diegodelemos
Copy link
Member Author

Tested in local repo, outcome here, steps to reproduce:

$ reana-dev helm-upgrade-components
$ reana-dev release-helm -u <YOUR-GITHUB-USERNAME>

f"rm -rf {index_path}",
f"mkdir {index_path}",
f"helm package helm/reana --destination {package_path} --dependency-update",
f"cr upload -o {user} -r {component}",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovered while amending #411 and checking out https://github.com/diegodelemos/reana/releases/tag/reana-0.7.0-alpha.2:

We should pass --release-name-template "{{ .Version }}" so the release on GitHub doesn't contain the reana- prefix (more here).

)
from reana.reana_dev.utils import (
display_message,
get_component_version_as_semver2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs amending, as get_component_version_as_semver2() does not exist...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and need to import get_docker_tag(). Otherwise it seems to work well 👍

@tiborsimko tiborsimko merged commit 41f96ac into reanahub:master Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: release-helm
2 participants