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

Allow triggering a release via the contrib/release script #2684

Merged
merged 2 commits into from Mar 28, 2017

Conversation

josegonzalez
Copy link
Member

@josegonzalez josegonzalez commented Mar 25, 2017

To run it:

# where RELEASE_TYPE can be [major, minor, patch, betafish]
contrib/release RELEASE_TYPE
  • Requires docker, git, and package_cloud gems
  • Requires the PACKAGECLOUD_API_TOKEN environment variable
  • Builds both a deb and rpm, pushing both to packagecloud
  • Upgrades the golang build environment to 1.7.5
  • Combines both build Dockerfiles into a single, generic env
  • Fixes issue where internal-functions file for tar plugin was not executable
  • Ensures that built plugins have a callback to clean up their source files before packaging
  • Adds support for “betafish” releases, which are untested versions of Dokku that are available via a separate packagecloud repository.

This doesn't yet create a tagged release with release notes, but I'll work on that in a future iteration.

@josegonzalez
Copy link
Member Author

Long term, we can use this to generate a deb package for all pull requests and potentially install dokku within a docker container, to validate that the deb packages can in fact still be built and contain the functionality we want. The betafish repository will serve to hold these HIGHLY unsupported packages.

- Requires docker, git, and package_cloud gems
- Requires the PACKAGECLOUD_API_TOKEN environment variable
- Builds both a deb and rpm, pushing both to packagecloud
- Upgrades the golang build environment to 1.7.5
- Combines both build Dockerfiles into a single, generic env
- Fixes issue where internal-functions file for tar plugin was not executable
- Ensures that built plugins have a callback to clean up their source files before packaging
- Adds support for “betafish” releases, which are untested versions of Dokku that are available via a separate packagecloud repository.
Copy link
Member

@michaelshobbs michaelshobbs left a comment

Choose a reason for hiding this comment

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

A few questions & nitpicks but seems legit. I assume you tested this locally, yea?

@@ -1091,7 +1091,7 @@ Thanks to the *many* contributors for making this release our best release so fa
- #1473: @josegonzalez Handle crashing containers by using restart=on-failure policy
- #1476: @michaelshobbs Support static nginx port when deploying without an application VHOST
- #1476: nginx proxy without VHOST
- #1477: @arthurschreiber Support removing config variables that contain `\n`.
- #1477: @arthurschreiber Support removing config variables containing newlines.
Copy link
Member

Choose a reason for hiding this comment

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

Curious why this change was necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

The thing that writes out history was rewriting these as actual newlines.

WORKDIR ${WORKDIR}

COPY Makefile ${WORKDIR}/

Copy link
Member

Choose a reason for hiding this comment

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

nitpick: group same directives. i.e. no extra whitespace

sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control && rm /tmp/build/DEBIAN/control.bak
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if you actually wanted to save the .bak for troubleshooting but if not, you can use -i ""

Copy link
Member Author

Choose a reason for hiding this comment

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

Was testing this on OS X, which doesn't have the raw -i flag.

Copy link
Member

Choose a reason for hiding this comment

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

Right. I'm pretty sure you can use -i "" (note: the double quotes) to avoid the backup file being written.

Copy link
Member Author

Choose a reason for hiding this comment

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

shrug this is the pattern we've followed elsewhere.

Copy link
Member

Choose a reason for hiding this comment

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

That's not necessarily a reason to leave it as is though. In any case, if you're comfortable with maintaining the pattern, then that's cool with me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I'm happy with it.

@josegonzalez josegonzalez merged commit e71cd7a into master Mar 28, 2017
@josegonzalez josegonzalez deleted the automated-release branch March 28, 2017 05:24
@josegonzalez josegonzalez changed the title feat: Allow triggering a release via the contrib/release script Allow triggering a release via the contrib/release script May 23, 2017
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.

None yet

2 participants