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

build: script to make custom builds #54661

Merged
merged 1 commit into from Sep 29, 2020

Conversation

jlinder
Copy link
Collaborator

@jlinder jlinder commented Sep 22, 2020

Before: We had the old build process and a not-so-great way to make
custom builds.

Why: We have a new build process that includes a facility for making
custom builds and we want it to be very easy to use.

Now:

This script automates much of the process of making a custom build
and makes it very easy to create one on short notice. Comments in the
script describe how to use it and where to go for getting the binaries
and docker image.

This commit also changes the teamcity-make-and-publish-build.sh script
to delete the temporary custombuild- tag and to be consistent in naming
the Build ID.

Part of #45487

Release note: None

@jlinder jlinder requested review from dt and pbardea September 22, 2020 16:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

LGTM

One small question, do you think that it would be useful to have periodic echos that explain what the script is doing, or would that be too verbose? I'm thinking of something like "creating tag $TAG for sha $SHA", and "pushing tag $TAG". I could image that this could be useful in case somehow something goes wrong with the script you can see what it was trying to do. My reservation here is that it might be too verbose.


echo
echo "Tag name: $TAG"
echo "Build ID: $ID"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a link (that is relatively stable and won't change too much) that we could echo here to point the user towards Make And Publish build? Maybe we could also add a message that they should be able to find the tag name there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Done.

@dt
Copy link
Member

dt commented Sep 29, 2020

I'm not sure we need to checkout in the local workdir at all (and mess with submodules, dirty checkouts, etc) do we?

Like, can't this all just be git tag $(git describe --tags --match=v[0-9]* $1) $1 and push?

Before: We had the old build process and a not-so-great way to make
custom builds.

Why: We have a new build process that includes a facility for making
custom builds and we want it to be very easy to use.

Now:

This script automates much of the process of making a custom build
and makes it very easy to create one on short notice. Comments in the
script describe how to use it and where to go for getting the binaries
and docker image.

This commit also changes the teamcity-make-and-publish-build.sh script
to delete the temporary custombuild- tag and to be consistent in naming
the Build ID.

Release note: None
@jlinder
Copy link
Collaborator Author

jlinder commented Sep 29, 2020

I'm not sure we need to checkout in the local workdir at all (and mess with submodules, dirty checkouts, etc) do we?

Like, can't this all just be git tag $(git describe --tags --match=v[0-9]* $1) $1 and push?

Yes. You're right. Updated. Thanks!

do you think that it would be useful to have periodic echos that explain what the script is doing, or would that be too verbose? I'm thinking of something like "creating tag $TAG for sha $SHA", and "pushing tag $TAG". I could image that this could be useful in case somehow something goes wrong with the script you can see what it was trying to do. My reservation here is that it might be too verbose.

I was ready to add the messages before removing the checking out of the tag. Now there's so little happening and the commands that do run should say why they fail if they fail, that it doesn't seem like it's needed.

@jlinder
Copy link
Collaborator Author

jlinder commented Sep 29, 2020

bors r+

TFTR!

@craig
Copy link
Contributor

craig bot commented Sep 29, 2020

Build succeeded:

@craig craig bot merged commit b864229 into cockroachdb:master Sep 29, 2020
@jlinder jlinder deleted the jhl/tag-custom-build branch September 30, 2020 14:12
jlinder added a commit to jlinder/cockroach that referenced this pull request Oct 13, 2020
Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR cockroachdb#54661 causing master to fail builds in Make
and Publish Build.

Release note: None
jlinder added a commit to jlinder/cockroach that referenced this pull request Oct 13, 2020
Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR cockroachdb#54661 causing master to fail builds in Make
and Publish Build.

Release note: None
craig bot pushed a commit that referenced this pull request Oct 13, 2020
55505: build: fix builds using grep to match a string. r=pbardea a=jlinder

Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR #54661 causing master to fail builds in Make
and Publish Build.

Release note: None

55516: roachtest: temporarily omit testing setting in sqlsmith r=yuzefovich a=yuzefovich

Recently introduced `testing_vectorize_inject_panics` testing session
variable is only supported on master branch, so we need to gate its
usage based on the version. However, 21.1 version hasn't been minted
yet, so we temporarily disable the setting's usage.

Fixes: #55482.

Release note: None

Co-authored-by: James H. Linder <jamesl@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
jlinder added a commit to jlinder/cockroach that referenced this pull request Oct 14, 2020
Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR cockroachdb#54661 causing master to fail builds in Make
and Publish Build.

Release note: None
jlinder added a commit to jlinder/cockroach that referenced this pull request Oct 14, 2020
Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR cockroachdb#54661 causing master to fail builds in Make
and Publish Build.

Release note: None
jlinder added a commit to jlinder/cockroach that referenced this pull request Oct 14, 2020
Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR cockroachdb#54661 causing master to fail builds in Make
and Publish Build.

Release note: None
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.

None yet

4 participants