-
Notifications
You must be signed in to change notification settings - Fork 154
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
Resolve kubernetes setup #18
Conversation
narph
commented
Jan 27, 2022
- update docs
- fix setup
- add test step to ci
* ci: enable k8s specific validations * add scripts * ci: use the rigth when * ci: enable k8s specific validations * ci: use the rigth when * script: enable execution permissions * script: enable execution permissions * ci: enable k8s specific validations * ci: use the rigth when * Update .ci/Jenkinsfile Co-authored-by: narph <mariana@elastic.co>
.ci/Jenkinsfile
Outdated
try { | ||
// Add some environmental resilience when setup does not work the very first time. | ||
def i = 0 | ||
retryWithSleep(retries: 3, seconds: 5, backoff: true){ | ||
try { | ||
sh(label: "Setup kind", script: ".ci/scripts/kind-setup.sh") | ||
} catch(err) { | ||
i++ | ||
sh(label: 'Delete cluster', script: 'kind delete cluster') | ||
if (i > 2) { | ||
error("Setup kind failed with error '${err.toString()}'") | ||
} | ||
} | ||
} | ||
sh(label: "Deploy to kubernetes",script: "make -C deploy/kubernetes test") | ||
} finally { | ||
sh(label: 'Delete cluster', script: 'kind delete cluster') | ||
} | ||
} |
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.
This won't work
The initial attempt with the previous changes was to simplify the pipeline and reduce any complexity. In addition, there is a typo with an extra try
, besides declarative pipelines don't allow to use if conditionals.
What's the reason for this new changes?
I'd prefer to keep the CI implementation simpler
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 k8s test is failing because the workloads are not deleted per round. The sequence should be like “deploy standalone and check then delete”, then “deploy managed and check then delete”. I was trying to bring this section into the step https://github.com/elastic/beats/blob/3a6bd25c4df97fdf6109df2e99cc157e4bd27a24/Jenkinsfile#L306
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.
See my comment in the review
I just created elastic/apm-pipeline-library#1530 then this particular PR could be simpler in terms of using the shared library step and get rid of specific implementation. In a nutshell, no shell scripts might be needed anymore. I'll test those changes and then keep you posted |
/test |
temp rename-fix due to elastic/beats#30402 |
* fix docs * add scripts * script: enable execution permissions * ci: enable k8s specific validations (#19) * ci: enable k8s specific validations * add scripts * ci: use the rigth when * ci: enable k8s specific validations * ci: use the rigth when * script: enable execution permissions * script: enable execution permissions * ci: enable k8s specific validations * ci: use the rigth when * Update .ci/Jenkinsfile Co-authored-by: narph <mariana@elastic.co> * delete cluster * test * add delete * ci: more resilience when installing kind See elastic/beats#21857 * ci: argument in the signature is not needed * remove duplicate * ci: simplify kind/kubectl environment (#22) * revert aarch64 changes (#21) * revert aarch64 * fmt * rename * rename * rename * ci: run k8s validation for different versions (#25) Co-authored-by: Victor Martinez <VictorMartinezRubio@gmail.com>
* fix docs * add scripts * script: enable execution permissions * ci: enable k8s specific validations (#19) * ci: enable k8s specific validations * add scripts * ci: use the rigth when * ci: enable k8s specific validations * ci: use the rigth when * script: enable execution permissions * script: enable execution permissions * ci: enable k8s specific validations * ci: use the rigth when * Update .ci/Jenkinsfile Co-authored-by: narph <mariana@elastic.co> * delete cluster * test * add delete * ci: more resilience when installing kind See elastic/beats#21857 * ci: argument in the signature is not needed * remove duplicate * ci: simplify kind/kubectl environment (#22) * revert aarch64 changes (#21) * revert aarch64 * fmt * rename * rename * rename * ci: run k8s validation for different versions (#25) Co-authored-by: Victor Martinez <VictorMartinezRubio@gmail.com>