Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

NO-ISSUE: Make target to automate releases #283

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

pkliczewski
Copy link
Collaborator

New target release-all automates release process as well as builds, tags and pushes new version of images.

Change type

  • New feature
  • Bug fix
  • Unit tests
  • Integration tests
  • CI
  • Documentation
  • Auto generated SDK code

Impacted services

  • Workflow Service
  • Notifivcation Service

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.

@openshift-ci-robot
Copy link
Collaborator

@pkliczewski: This pull request explicitly references no jira issue.

In response to this:

New target release-all automates release process as well as builds, tags and pushes new version of images.

Change type

  • New feature
  • Bug fix
  • Unit tests
  • Integration tests
  • CI
  • Documentation
  • Auto generated SDK code

Impacted services

  • Workflow Service
  • Notifivcation Service

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


$(DOCKER) tag docker-compose_workflow-service:latest $(ORG)$(WORKFLOW_SERVICE_IMAGE):$(GIT_BRANCH)
$(DOCKER) tag docker-compose_notification-service:latest $(ORG)$(NOTIFICATION_SERVICE_IMAGE):$(GIT_BRANCH)
$(DOCKER) tag docker-compose_workflow-service:latest $(ORG)$(WORKFLOW_SERVICE_IMAGE):$(TAG)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this TAG we need to change in .github/workflows/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The changes do not influence current behavior. Please see

$(eval TAG?=$(GIT_HASH))

We still use hash and we only use TAG when we run release-all target

Comment on lines +79 to +82
all: mvn-checks java-checks install ## Build all modules

install: ARGS = $(FAST_BUILD_ARGS)
install: clean
Copy link
Contributor

Choose a reason for hiding this comment

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

As I see it make all is running maven install target
mvn-checks java-checks validation targets also should be done before make install
If you think it better, just can rename all to install?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mvn install influenced the name of this target to be install. Running all in release sequence fails.

Copy link
Contributor

Choose a reason for hiding this comment

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

So one of the mvn-checks or java-checks fails in the release sequence? why?

Makefile Outdated
bump-version: ## update post-release version and update commit message
find . -type f | xargs sed -i 's/$(RELEASE_VERSION)/${NEXT_VERSION}/g'

git-commit: ## adds all files and bumps the version
Copy link
Contributor

Choose a reason for hiding this comment

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

This is too general target name, need to have name that clarify it only for version bump
suggestion: bump-git-commit
Or maybe this target can be merged with bump-version target?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will change the name. Merging both targets is not good idea because they do not run one after the other.

Makefile Outdated

git-commit: ## adds all files and bumps the version
git add .
git commit -m 'Version bump'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we include also the version we bump to? (should ease the search when/if needed).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure we can. I based the flow on current way of releasing. It makes sense to have version there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Overall lgtm, only one question: is it ok that the commit is unsigned?

Makefile Outdated
find . -type f | xargs sed -i 's/$(RELEASE_VERSION)/${NEXT_VERSION}/g'

git-commit: ## adds all files and bumps the version
git add .
Copy link
Contributor

Choose a reason for hiding this comment

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

May be a safer choice, use git add -u .? So it will commit only tracked files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, at this time we do not expect any files which are untracked. Will fix.

@openshift-ci
Copy link

openshift-ci bot commented Apr 27, 2023

New changes are detected. LGTM label has been removed.

New target `release-all` automates release process as well as builds,
tags and pushes new version of images.

Signed-off-by: Piotr Kliczewski <piotr.kliczewski@gmail.com>
@@ -18,6 +18,8 @@ NOTIFICATION_SERVICE_IMAGE=notification-service

# get version from pom
VERSION = $(shell sed -n "s/<revision>\(.*\)<\/revision>/\1/p" $(PWD)/pom.xml | sed 's/\ *//g')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's safer to use something like 'mvn help:evaluate -Dexpression=project.version -q -DforceStdout' to get the project version. but if we can't use mvn cmd here then this is fine

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will explore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could use mvn here but we would not be able to run make mvn-checks if maven not installed. Is there any other non maven command we could use here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think so. let's keep sed then

@openshift-ci
Copy link

openshift-ci bot commented Apr 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 240bf2b into parodos-dev:main Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants