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

[RelEng] Add reusable verifyFreezePeriode workflow #24

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/callFreezePeriodCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow calls the Code-Freeze-Period check

name: Check for Code Freeze Period

on:
pull_request:
branches:
- 'master'

jobs:
check-freeze-period:
uses: ./.github/workflows/verifyFreezePeriod.yml
23 changes: 23 additions & 0 deletions .github/workflows/verifyFreezePeriod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow will check if the project is currently in a Code-Freeze-Period

name: Verify Code Freeze Period

on:
workflow_call

jobs:
verify-freeze-period:
runs-on: ubuntu-latest
steps:
- name: Checking whether Eclipse project is currently in stabilitzation/code-freeze period ...
run: |
today=$(TZ=UTC date "+%Y%m%d")
tomorrow=$(TZ=UTC date -d "+1 days" "+%Y%m%d")
calID="cHJmazI2ZmRtcHJ1MW1wdGxiMDZwMGpoNHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ"
curl "https://calendar.google.com/calendar/u/0/htmlembed?src=${calID}&mode=AGENDA&ctz=UTC&dates=${today}/${tomorrow}" | grep -i -q -e "stabilization"
if [[ $? == 0 ]]; then
echo "::error::Today is a freeze day"
exit 1 #Exiting with non-0 makes this workflow fail
fi
echo "No code freeze today"
shell: bash {0} # do not fail-fast
9 changes: 0 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,5 @@ pipeline {
}
}
}
stage('Check freeze period') {
steps {
sh "wget https://download.eclipse.org/eclipse/relengScripts/scripts/verifyFreezePeriod.sh"
sh "chmod +x verifyFreezePeriod.sh"
withCredentials([string(credentialsId: 'google-api-key', variable: 'GOOGLE_API_KEY')]) {
sh './verifyFreezePeriod.sh'
}
}
}
}
}