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

Handle multiple lightweight tabs on a commit #1858

Merged
merged 1 commit into from
Jun 28, 2018
Merged

Conversation

zjs
Copy link
Member

@zjs zjs commented Jun 28, 2018

The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to lexicographic ordering to break the tie between two or
more candidate tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).


VIC Appliance Checklist:

  • Up to date with master branch
  • Added tests
  • Considered impact to upgrade
  • Tests passing
  • Updated documentation
  • Impact assessment checklist

If this is a feature or change to existing functionality, consider areas of impact with the Impact
Assessment Checklist

@zjs zjs self-assigned this Jun 28, 2018
zjs added a commit to zjs/vic-product that referenced this pull request Jun 28, 2018
The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to alphabetical selection to break the tie between two or
more candidate tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).
The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to lexicographic ordering to break ties between candidate
tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).
Copy link
Member

@hickeng hickeng left a comment

Choose a reason for hiding this comment

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

I like this - it makes it consistent with the build number and allows override on the CLI for testing tag behaviour if needed.
We need to find a way to de-duplicate this build logic with the vic repo.

@zjs zjs merged commit 0be2645 into vmware:master Jun 28, 2018
zjs added a commit to zjs/vic-product that referenced this pull request Jun 28, 2018
The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to lexicographic ordering to break ties between candidate
tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).
zjs added a commit to zjs/vic-product that referenced this pull request Jun 28, 2018
The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to lexicographic ordering to break ties between candidate
tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).

(cherry picked from commit 0be2645)
zjs added a commit that referenced this pull request Jun 28, 2018
The GitHub release process creates lightweight tags, which do not have
associated metadata such as date information. This causes git describe
to fall back to lexicographic ordering to break ties between candidate
tags when multiple exist on a given commit.

When building a new RC build to pick up a new RC build of a component,
we wind up with multiple tags on a single commit in vic-product (since
we simply need to do a new build of the same commit to pick up the new
build of the changed component).

When we are performing a tag build, we expect the corresponding tag to
be used— which may not always be the tag that would be selected by git
describe. Ensure we use the expected tag falling back to git describe
only if the $DRONE_TAG variable is not set.

This should preserve the current behavior for non-tag builds (and when
building outside of our CI/CD environment) and enable continued use of
lightweight tags (while we explore the impacts of using annotated tags
on our CI/CD logic).

(cherry picked from commit 0be2645)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants