-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Jenkinsfile to run E2E Happy path tests against K8S #14149
Conversation
Signed-off-by: Dmytro Nochevnov <[email protected]>
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sh
steps formatting is really weird..
script { | ||
sh """ | ||
wget --no-verbose https://github.com/che-incubator/chectl/releases/latest/download/chectl-linux | ||
sudo mv chectl-linux /usr/local/bin/chectl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to put chectl executable somewhere inside workspace and put that directory on PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yes, it would be better. Thanks for advice!
stage("Cleanup") { | ||
steps { | ||
script() { | ||
sh "env" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this serve any purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it doesn't now.
Thanks for notice!
failFast true | ||
|
||
parallel { | ||
stage("Cleanup") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to do cleanup in post actions? Using
cleanWs notFailBuild: true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be builds aborted before, so we should insure codenvy-slave9
is ready for usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And cleanWs notFailBuild: true
is suitable here as well. Thanks for advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE: cleanWs notFailBuild: true
IS NOT suitable here. I have mislead that command propose.
sh """ | ||
/usr/local/bin/chectl server:start \\ | ||
--k8spodreadytimeout=180000 \\ | ||
-t=${WORKSPACE}/deploy/ \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this ${WORKSPACE}/deploy/
folder came from? eclipse/che git repo is cloned into relative dir che
... Shouldn't this be ${WORKSPACE}/che/deploy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There is che
project content in the root of workspace directory on codenvy-slave9
remained from previous builds.
PATH = "/tmp:/qa/tools/opt/apache-maven-3.5.4/bin:$PATH" | ||
JENKINS_BUILD = "true" | ||
|
||
DEVFILE_URL = "${WORKSPACE}/e2e/files/happy-path/happy-path-workspace.yaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing che
directory? ${WORKSPACE}/che/e2e/files/happy-path/happy-path-workspace.yaml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There is che
project content in the root of workspace directory on codenvy-slave9
remained from previous builds.
script { | ||
sh """ | ||
/usr/local/bin/chectl workspace:start --devfile=$DEVFILE_URL | ||
kubectl get configmaps --namespace=che che -o yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some debugging leftovers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be moved to post action steps, indeed.
always { | ||
script { | ||
// it's impossible to use 'when' in the global post block | ||
if (currentBuild.currentResult != 'ABORTED') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not executing on aborting the job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Let's execute it anyway. Thanks for advice!
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:
|
Signed-off-by: Dmytro Nochevnov <[email protected]>
@rhopp: could you, please, review fixup to your notices? |
Signed-off-by: Dmytro Nochevnov <[email protected]>
new-ci-test |
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
stage("Create test workspace") { | ||
steps { | ||
script { | ||
sh "/usr/local/bin/chectl workspace:start --devfile=$DEVFILE_URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should use ${WORKSPACE}/chectl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
I must have fixed it.
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
Signed-off-by: Dmytro Nochevnov <[email protected]>
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:
|
What does this PR do?
It's aimed to replace shell script to run E2E Happy path tests, which is in-build into PR check job on CRW CI, with Jenkinsfile.
An example of Jenkinsfile execution: https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/blue/organizations/jenkins/Single-Che-PR-check-E2E-Happy-path-tests-against-k8s-on-codenvy-slave9/detail/Single-Che-PR-check-E2E-Happy-path-tests-against-k8s-on-codenvy-slave9/12/pipeline/
![Screenshot from 2019-08-07 18-26-00](https://user-images.githubusercontent.com/1197777/62636169-b3ad4280-b941-11e9-9799-542c16c079e7.png)
What issues does this PR fix or reference?
#14068