Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Nov 17, 2020

Adds names to steps, adds the sleep between prep and publish, adds the global git user config..

Adds names to steps, adds the sleep between prep and publish, adds the global git user config..
@BYK BYK requested a review from chadwhitacre November 17, 2020 21:09
@chadwhitacre
Copy link
Member

vs. sentry

--- sentry/.github/workflows/release.yml	2020-11-17 14:53:45.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:10:38.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -49,8 +54,8 @@
       - id: set-git-user
         name: Set git user to getsentry-bot
         run: |
-          git config user.name getsentry-bot
-          git config user.email bot@getsentry.com
+          git config --global user.name getsentry-bot
+          git config --global user.email bot@getsentry.com
       - uses: getsentry/craft@master
         name: Craft Prepare
         if: ${{ !github.event.inputs.skip_prepare }}
@@ -59,6 +64,9 @@
           version: ${{ env.RELEASE_VERSION }}
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
+          GIT_COMMITTER_NAME: getsentry-bot
+          GIT_AUTHOR_NAME: getsentry-bot
+          EMAIL: bot@getsentry.com
           ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
       # Wait until the builds start. Craft should do this automatically
       # but it is broken now.
@@ -68,18 +76,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          TWINE_USERNAME: '__token__'
-          TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-      - id: next-dev-version
-        name: Set new version for development
-        if: ${{ !github.event.inputs.dry_run }}
+      # We need this additonal step because we don't merge release branches into master to
+      # keep always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
         run: |
-          git checkout master
-          ./scripts/bump-version.sh '' $(date -d "$(echo $RELEASE_VERSION | sed -e 's/^\([0-9]\{2\}\)\.\([0-9]\{1,2\}\)\.[0-9]\+$/20\1-\2-1/') 1 month" +%y.%-m.0.dev0)
-          git diff --quiet || git commit -anm 'meta: Bump new development version' && git pull --rebase && git push
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

vs. relay

--- relay/.github/workflows/release.yml	2020-11-17 15:36:05.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:10:38.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -59,6 +64,9 @@
           version: ${{ env.RELEASE_VERSION }}
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
+          GIT_COMMITTER_NAME: getsentry-bot
+          GIT_AUTHOR_NAME: getsentry-bot
+          EMAIL: bot@getsentry.com
           ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
       # Wait until the builds start. Craft should do this automatically
       # but it is broken now.
@@ -68,10 +76,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          CRAFT_GCS_TARGET_CREDS_JSON: ${{ secrets.CRAFT_GCS_TARGET_CREDS_JSON }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
+      # We need this additonal step because we don't merge release branches into master to
+      # keep always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
+        run: |
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

@BYK
Copy link
Member Author

BYK commented Nov 17, 2020

Yeah, the schedule shift is intentional as we want to wait for other projects (Sentry, Snuba, Relay) to be done before triggering the release here.

The force flag was specific to this repo and that's a good catch as this PR made it obsolete. Let me fix that

NVM, it's still here: https://github.com/getsentry/onpremise/pull/744/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L31

@chadwhitacre
Copy link
Member

Yeah okay I was surprised to hear you say that the force flag is obsolete now, we def want the kill switch still afaict.

@chadwhitacre
Copy link
Member

vs. sentry

--- sentry/.github/workflows/release.yml	2020-11-17 14:53:45.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:20:53.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -49,8 +54,8 @@
       - id: set-git-user
         name: Set git user to getsentry-bot
         run: |
-          git config user.name getsentry-bot
-          git config user.email bot@getsentry.com
+          git config --global user.name getsentry-bot
+          git config --global user.email bot@getsentry.com
       - uses: getsentry/craft@master
         name: Craft Prepare
         if: ${{ !github.event.inputs.skip_prepare }}
@@ -68,18 +73,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          TWINE_USERNAME: '__token__'
-          TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-      - id: next-dev-version
-        name: Set new version for development
-        if: ${{ !github.event.inputs.dry_run }}
+      # We need this additonal step because we don't merge release branches into master to
+      # always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
         run: |
-          git checkout master
-          ./scripts/bump-version.sh '' $(date -d "$(echo $RELEASE_VERSION | sed -e 's/^\([0-9]\{2\}\)\.\([0-9]\{1,2\}\)\.[0-9]\+$/20\1-\2-1/') 1 month" +%y.%-m.0.dev0)
-          git diff --quiet || git commit -anm 'meta: Bump new development version' && git pull --rebase && git push
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

vs. relay

--- relay/.github/workflows/release.yml	2020-11-17 15:36:05.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:20:53.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -68,10 +73,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          CRAFT_GCS_TARGET_CREDS_JSON: ${{ secrets.CRAFT_GCS_TARGET_CREDS_JSON }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
+      # We need this additonal step because we don't merge release branches into master to
+      # always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
+        run: |
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

@BYK
Copy link
Member Author

BYK commented Nov 17, 2020

Yup all diffs are expected at this point.

@chadwhitacre
Copy link
Member

8a1cf82 vs. sentry

--- sentry/.github/workflows/release.yml	2020-11-17 14:53:45.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:24:13.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -49,8 +54,8 @@
       - id: set-git-user
         name: Set git user to getsentry-bot
         run: |
-          git config user.name getsentry-bot
-          git config user.email bot@getsentry.com
+          git config --global user.name getsentry-bot
+          git config --global user.email bot@getsentry.com
       - uses: getsentry/craft@master
         name: Craft Prepare
         if: ${{ !github.event.inputs.skip_prepare }}
@@ -59,7 +64,6 @@
           version: ${{ env.RELEASE_VERSION }}
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
       # Wait until the builds start. Craft should do this automatically
       # but it is broken now.
       - run: sleep 10
@@ -68,18 +72,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          TWINE_USERNAME: '__token__'
-          TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-      - id: next-dev-version
-        name: Set new version for development
-        if: ${{ !github.event.inputs.dry_run }}
+      # We need this additonal step because we don't merge release branches into master to
+      # always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
         run: |
-          git checkout master
-          ./scripts/bump-version.sh '' $(date -d "$(echo $RELEASE_VERSION | sed -e 's/^\([0-9]\{2\}\)\.\([0-9]\{1,2\}\)\.[0-9]\+$/20\1-\2-1/') 1 month" +%y.%-m.0.dev0)
-          git diff --quiet || git commit -anm 'meta: Bump new development version' && git pull --rebase && git push
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

8a1cf82 vs. relay

--- relay/.github/workflows/release.yml	2020-11-17 15:36:05.000000000 -0500
+++ onpremise/.github/workflows/release.yml	2020-11-17 16:24:13.000000000 -0500
@@ -13,10 +13,15 @@
         description: Do not actually cut the release
         required: false
         default: false
+      force:
+        description: Force the release, bypassing the 'release-blocker' issue killswitch
+        required: false
+        default: false
   schedule:
-    # We want the release to be at 9-10am Pacific Time
-    # We also want it to be 1 hour before the on-prem release
-    - cron: '0 17 15 * *'
+    # We want the release to be at 10 or 11am Pacific Time
+    # We also make this an hour after all others such as Sentry,
+    # Snuba, and Relay to make sure their releases finish.
+    - cron: '0 18 15 * *'
 jobs:
   release:
     runs-on: ubuntu-latest
@@ -59,7 +64,6 @@
           version: ${{ env.RELEASE_VERSION }}
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
       # Wait until the builds start. Craft should do this automatically
       # but it is broken now.
       - run: sleep 10
@@ -68,10 +72,14 @@
         with:
           action: publish
           version: ${{ env.RELEASE_VERSION }}
+          no_merge: '--no-merge'
         env:
           DRY_RUN: ${{ github.event.inputs.dry_run }}
-          GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
-          ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
-          CRAFT_GCS_TARGET_CREDS_JSON: ${{ secrets.CRAFT_GCS_TARGET_CREDS_JSON }}
-          DOCKER_USERNAME: 'sentrybuilder'
-          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
+      # We need this additonal step because we don't merge release branches into master to
+      # always keep it on nightlies
+      - id: bump-license-date
+        name: Bump license chage date
+        if: ${{ !github.event.inputs.dry_run && !github.event.inputs.version }}
+        run: |
+          sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
+          git diff --quiet || git commit -anm 'license: Update BSL change date' && git push

Copy link
Member

@chadwhitacre chadwhitacre left a comment

Choose a reason for hiding this comment

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

Alright, I'm ready to give this a shot.

@BYK BYK merged commit 99c9c52 into master Nov 17, 2020
@BYK BYK deleted the byk/fix/sleep-craft branch November 17, 2020 21:27
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2020
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.

3 participants