-
Notifications
You must be signed in to change notification settings - Fork 719
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
E2E Tests are always run from the master branch #3066
Comments
I think we can make a branch specifier (git commit/branch/tag) parameter at the job level to use it for the git checkout in the e2e tests jobs jjbb definitions: parameters:
+ - string:
+ name: BRANCH_SPECIFIER
+ default: master
+ description: Git branch specifier (<branchName>,
+ <tagName>, <gitCommit>, etc.)
- string:
name: JKS_PARAM_OPERATOR_IMAGE
description: "ECK Docker image"
@@ -16,7 +21,7 @@
- git:
url: https://github.com/elastic/cloud-on-k8s
branches:
- - master
+ - $BRANCH_SPECIFIER And we propagate the git commit in the build (release and nightly snapshots) pipeline that triggers these jobs: build job: 'cloud-on-k8s-e2e-tests-xxx',
- parameters: [string(name: 'JKS_PARAM_OPERATOR_IMAGE', value: operatorImage)],
+ parameters: [
+ string(name: 'JKS_PARAM_OPERATOR_IMAGE', value: operatorImage),
+ string(name: 'BRANCH_SPECIFIER', value: GIT_COMMIT)
+ ],
wait: false
|
+1, it's nice since it means we can also manually run those job and specify the git commit we want to use. |
Quick-update: the previous diff I wrote is wrong as it only concerns the sha1 to checkout the Jenkinsfile. We need to work at the pipeline level (the Jenkinsfile) and to override the default checkout, thing we already did to have a retry. In short, this is not so easy. |
Actually it can work but only if we switch An alternative to avoid the extra checkout([$class: 'GitSCM',
branches: [[name: params.branch_specifier ]],
extensions: [[$class: 'WipeWorkspace']],
userRemoteConfigs: [[
credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
url: 'https://github.com/elastic/cloud-on-k8s',
refspec: params.branch_specifier
]]
]) Whatever the solution chosen, we can reduce the number of checkouts. We can use |
Let's start with the simpler solution despite the extra |
When running e2e tests against a branch we should use the e2e tests from this specific branch.
Otherwise some E2E tests in master may fail because they require some features which are not available in the tested branch.
This is the root cause of #3055
The text was updated successfully, but these errors were encountered: