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

Resolve kubernetes setup #18

Merged
merged 17 commits into from
Feb 15, 2022
Merged

Resolve kubernetes setup #18

merged 17 commits into from
Feb 15, 2022

Conversation

narph
Copy link
Contributor

@narph narph commented Jan 27, 2022

  • update docs
  • fix setup
  • add test step to ci

narph and others added 6 commits January 27, 2022 12:51
* 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 <[email protected]>
.ci/Jenkinsfile Outdated
Comment on lines 107 to 125
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')
}
}
Copy link
Member

@v1v v1v Feb 1, 2022

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

Copy link
Contributor Author

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

Copy link
Member

@v1v v1v left a 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

@v1v
Copy link
Member

v1v commented Feb 7, 2022

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

@v1v
Copy link
Member

v1v commented Feb 10, 2022

/test

@elasticmachine
Copy link
Contributor

elasticmachine commented Feb 10, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Duration: 20 min 39 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@narph
Copy link
Contributor Author

narph commented Feb 15, 2022

temp rename-fix due to elastic/beats#30402

@narph narph merged commit 6da15a7 into main Feb 15, 2022
@narph narph deleted the kube-ci branch February 15, 2022 16:11
narph referenced this pull request in narph/elastic-agent-temp Feb 21, 2022
* 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 <[email protected]>

* 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 <[email protected]>
narph added a commit that referenced this pull request Mar 3, 2022
* 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 <[email protected]>

* 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants