Skip to content

Commit

Permalink
Bump versions for test release (Please build! 2.23.0a0)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiGlobus committed Jun 27, 2024
1 parent e176403 commit 35ebfb6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
57 changes: 57 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,60 @@ git push
4. Run the release script `./release.sh` from the repo root. This will use
`tox` and your pypi credentials and will create a signed release tag. At the
end of this step, new packages will be published to pypi and the tag to GitHub.


### DEB/RPM Packaging Workflow

#### Pre-requisites

Before building the packages, ensure that the release itself, either the alpha
or prod versions, is published on PyPI.

#### Build Process

In the future, building the DEB/RPM packages will be a simple one-step button
click of the green **Build** button on the Globus Compute Agent
[build page here](https://builds.globus.org/jenkins/job/BuildGlobusComputeAgentPackages/build?delay=0sec).

As a temporary workaround, we need to add a few lines to manually set some
env variables in our [JenkinsFile](https://github.com/globus/globus-compute/blob/743fa1e398fd40a00efb5880c55e3fa6e47392fc/compute_endpoint/packaging/JenkinsFile#L24) before triggering the build, as detailed below.

1. Git checkout both the current release branch that was recently pushed to
PyPI, ie. ``v2.23.0`` or ``v2.25.0a0`` and the ``build_for_stable`` branch
2. Rebase ``build_for_stable`` on the release branch which should result in
adding the following ~6 lines:

...
env.BRANCH_NAME = scmVars.GIT_BRANCH.replaceFirst(/^.*origin\//, "")
+ env.TAG_NAME = sh(returnStdout: true, script: "git tag --contains | head -1").trim()
env.SOURCE_STASH_NAME = "${UUID.randomUUID()}"
echo "env.BRANCH_NAME = ${env.BRANCH_NAME}"
sh "git clean -fdx"

+ // temporary hack to build for stable
+ sh "git checkout build_for_stable"
+ env.TAG_NAME = "v2.23.0"
+ env.DEFAULT_BRANCH = "build_for_stable"
+
dir("compute_endpoint/packaging/") {
...

3. Change the ``env.TAG_NAME`` above to the current production release version
* Note that ``env.TAG_NAME`` determines whether the build is sent to
the ``unstable`` repo or also to the ``testing`` and ``stable`` ones.
* Example of unstable repo:
* https://downloads.globus.org/globus-connect-server/unstable/rpm/el/9/x86_64/
* Example of stable repo:
* https://downloads.globus.org/globus-connect-server/stable/rpm/el/9/x86_64/
* The logic of whether a release is stable is determined by whether the
package version of Globus Compute Endpoint set in ``version.py`` or
``setup.py`` matches ``env.TAG_NAME`` above. If they are unequal, then
[publishResults.groovy line 85](https://github.com/globusonline/gcs-build-scripts/blob/168617a0ccbb0aee7b3bee04ee67940bbe2a80f6/vars/publishResults.groovy#L85)
will be (``tag`` : v2.23.0) != (``stable_tag`` : v2.23.0a0), where
stable_tag is constructed from the package version of an alpha release.
4. Commit and push your ``build_for_stable`` branch
5. Click the [build button here](https://builds.globus.org/jenkins/job/BuildGlobusComputeAgentPackages/build?delay=0sec)
6. Wait 20-30 minutes and confirm that the [build is green](https://builds.globus.org/jenkins/job/BuildGlobusComputeAgentPackages/)
7. For production release, we will have finished the build before the GCS
team, and can notify them that our build is complete. They then will
publish all packages when they finish their builds, which includes ours.
6 changes: 6 additions & 0 deletions compute_endpoint/packaging/JenkinsFile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ pipeline {
script {
def scmVars = checkout scm
env.BRANCH_NAME = scmVars.GIT_BRANCH.replaceFirst(/^.*origin\//, "")
env.TAG_NAME = sh(returnStdout: true, script: "git tag --contains | head -1").trim()
env.SOURCE_STASH_NAME = "${UUID.randomUUID()}"
echo "env.BRANCH_NAME = ${env.BRANCH_NAME}"
sh "git clean -fdx"

// temporary hack to build for stable
sh "git checkout build_for_stable"
env.TAG_NAME = "v2.23.0a0"
env.DEFAULT_BRANCH = "build_for_stable"

dir("compute_endpoint/packaging/") {
sh(script: "make show_vars")
sh(script: "make setup_dist_for_deb setup_dist_for_rpm")
Expand Down

0 comments on commit 35ebfb6

Please sign in to comment.