-
Notifications
You must be signed in to change notification settings - Fork 57
Pass inherited branches config to Aqua Stage #1170
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
base: master
Are you sure you want to change the base?
Conversation
Regarding the develpoment setup I have the same challenges. It's tedious to figure out what's expected and needed. An option might to adding devcontainer setup. Starting point: https://github.com/opendevstack/ods-jenkins-shared-library/pull/1173/files |
I am not using java in any other project, and I currently only use When I try to install JDK 11 with mise, I get the following: ❯ mise use java@11
mise ERROR no metadata found for version 11
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information It would be good, to have a possibility like devcontainer os something else that does not rely on a JDK install locally. @gerardcl I know that everyone is very busy, but would it be possible to have you are someone else support with writing a test setup for this. ods-jenkins-shared-library/test/groovy/vars/OdsComponentStageBuildOpenShiftImageSpec.groovy Lines 218 to 251 in f5f9d14
|
hi @mobilutz feel free to connect internally, thanks |
@mobilutz I suggest to follow the devcontainer approach which is already used by some other Quickstarters (inf-terraform) and ODS itself. @BraisVQ can you share the example we have been exchanging with a user in the business that uses jenkins agent images as a foundation? This would ensure that local development is streamlined with the build environment on top of ODS. FYI @gerardcl @mobilutz could you describe again what your problem with Aqua is? |
By the way, this was the approach @BraisVQ and I wanted to test with regards to devcontainer using Jenkins agent images:
To be able to access this image from your local machine, you will need to login to our OpenShift container image registry in EU first:
It would require some testing though. |
@metmajer The problem I have is, that the Aqua stage is running even when the build stage was skipped. That means that the image that Aqua should scan is not there and of course it is failing. Regarding |
@mobilutz not sure I understand the scenario. Instead of building, what do you do instead? Can you elaborate on the concept of "inherited branches"? |
@metmajer I think it is easier with sharing our (redacted) Jenkinsfile that help to show the situatuion:
As you can see, we are only map To prevent the Aqua-Stage to run in this situation, it is needed to pass the branches to the I hope that brings more light in the situation that I guess more than we have. |
This change is still missing specs, I do not see myself writing specs in the near future But I can say that we are running this change with the help of custom forked-repositories of the Maybe someone can support here with writing specs, this change will help developers a lot as the CI pipeline run can be shortened by quite a bit depending on the setup the repository has. |
While debugging an issue where the Aqua stage was ALWAYS run even when the build-stage was not, I stumbled over the issues that the inherited branches config is not being passed to the new Aqua stage that is created.
I tested it on a running jenkins setup, and can say that with this change, I see the following log output:
I know that a test for this case is missing, but I was not able to install JDK 11 locally, and with any newer JDK version I could not get groovy to work.
Any support on the testing front is greatly appreciated.
PS: Without this change, the truncated logs looks like this:
The problem is, that the OpenShift image is not being build because of the branches setup, but then the AquaScan is started here:
ods-jenkins-shared-library/vars/odsComponentStageBuildOpenShiftImage.groovy
Line 27 in f5f9d14
Another idea would be not to run the Aqua stage at all when the build stage is not executed.