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

Check for package-version-updated #261

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

sarbull
Copy link
Member

@sarbull sarbull commented Oct 25, 2021

Signed-off-by: Sirbu Nicolae-Cezar sirbunicolaecezar@gmail.com

LATER EDIT

Also, we can use this command so that we create a snapshot version in order to prepare a release and it will run the docker pipeline because it will sense a version change, in this way it will start the docker pipeline creating the required image.

/Users/sarbull/awesome-projects/egeria-ui [git::test-branch] [sarbull@my-computer] [17:09]
> npm version prerelease --preid snapshot
v3.1.2-snapshot.0

/Users/sarbull/awesome-projects/egeria-ui [git::test-branch] [sarbull@my-computer] [17:09]
> cat package.json 
{
  "name": "egeria-ui",
  "version": "3.1.2-snapshot.0",
  "description": "Egeria UI application",
....
}

After N number of snapshots when we'll bump the version it will look like this, here is an example of a patch after a couple of snapshots.

/Users/sarbull/awesome-projects/egeria-ui [git::test-branch] [sarbull@my-computer] [10:14]
> npm version patch
v3.1.2

Without version change:
Screenshot 2021-10-25 at 19 02 16

With version change:
Screenshot 2021-10-25 at 19 06 24

@sarbull sarbull force-pushed the check-for-package-version-updated branch 7 times, most recently from c5999df to c4f5c2e Compare October 25, 2021 15:54
Signed-off-by: Sirbu Nicolae-Cezar <sirbunicolaecezar@gmail.com>
@sarbull sarbull force-pushed the check-for-package-version-updated branch from c4f5c2e to c70ee0d Compare October 25, 2021 15:56
Signed-off-by: Sirbu Nicolae-Cezar <sirbunicolaecezar@gmail.com>
@lpalashevski
Copy link
Contributor

The solution seems good to me & most importantly fixes the major image overriding issue we had.
Lets add couple of lines of description in the README Release cycle, explaining the command to do pre-release npm version prerelease --preid snapshot and mention that new container image versions get created for each package.json version change.

Copy link
Contributor

@lpalashevski lpalashevski left a comment

Choose a reason for hiding this comment

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

Approved (see comment)

- name: Login to container registry (Quay.io)
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_ACCESS_TOKEN }}
if: ${{ github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
if: ${{ steps.check.outputs.changed == 'true' && github.event_name == 'push' && github.repository == 'odpi/egeria-ui' }}
# For releases (ie not main) we push the image - but not the latest tag
- name: Build and push (not master merge)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are not using release branches this block (61:70) is obsolete and can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

agree, but let's do that in a different iteration

Copy link
Member

@planetf1 planetf1 left a comment

Choose a reason for hiding this comment

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

Change looks good - We have the ability to do pre-release updates whenever we wish within the development cycle (to align with egeria master for example) as well as keep a stable release.

@sarbull sarbull merged commit 2bacc3a into odpi:master Oct 27, 2021
@sarbull sarbull deleted the check-for-package-version-updated branch July 1, 2022 11:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants