Skip to content

Commit

Permalink
Update CI workflow to work on new infra (#123)
Browse files Browse the repository at this point in the history
* Update CI workflow to work on new infra

- Backward compatability tests are disabled during CI by default #113
- Added property to allow for disabling bwc tests
- Added agent label to use specific hardware https://www.jenkins.io/doc/book/pipeline/syntax/#agent

Signed-off-by: Peter Nied <petern@amazon.com>
  • Loading branch information
peternied authored Feb 24, 2021
1 parent d7e6aa0 commit 5515b07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
pipeline {
agent any
agent { label 'search-cloud-ec2-c518xlarge' }


stages {
stage('Build') {
steps {
echo 'Building..'
sh './gradlew check --no-daemon'
// Disable backward compability tasks
sh './gradlew check --no-daemon --no-scan -Pbwc_tests_enabled=false'
}
}
stage('Test') {
Expand Down
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,13 @@ tasks.register("verifyVersions") {
* after the backport of the backcompat code is complete.
*/

boolean bwc_tests_enabled = true
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
boolean bwc_tests_enabled = false
String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
if (project.findProperty("bwc_tests_enabled") != null) {
bwc_tests_enabled = Boolean.parseBoolean(project.findProperty("bwc_tests_enabled"))
bwc_tests_disabled_issue = "Backward compatibility tests disabled via commandline"
}

if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")
Expand Down

0 comments on commit 5515b07

Please sign in to comment.