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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the Missing information on how to generate/create yaml file #2471

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

pyther-hub
Copy link
Contributor

This pr is for the issue #2446
using information from https://www.jenkins.io/doc/book/managing/casc/#configuration-as-code
I was able to write the details.

Your checklist for this pull request

馃毃 Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

@pyther-hub pyther-hub requested a review from a team as a code owner March 27, 2024 09:19
@pyther-hub pyther-hub changed the base branch from fixYamlSourceConstructor to master March 27, 2024 09:19
docs/PLUGINS.md Outdated

##### **Location of configuration-as-code.yml:**

By default, the YAML file for the CasC configuration is located in $JENKINS_HOME/jenkins.yaml. The location and name of the file being used is displayed on the Configuration as Code UI page. You can specify a different file to view by typing the full pathname into the Path or URL field.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these docs are not written from the right point of view. they've been written as user documentation (and basically duplicate of https://github.com/jenkinsci/configuration-as-code-plugin#getting-started)

the issue is asking for it to be part of writing an integration test where should you put the test file, e.g. this:
https://github.com/jenkinsci/azure-cosmosdb-plugin/blob/a22e3c625349d6ee2657d2f88fdef49baa3c4715/src/test/java/io/jenkins/plugins/azurecosmosdb/ConfigurationAsCodeTest.java#L29

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay sorry I got your point
like we have here https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/test/resources/org/csanchez/jenkins/plugins/kubernetes/casc/configuration-as-code.yaml
this is the ideal place for the configuration-as-code.yaml file I have made the required changes but I am still not able to write this in a very detailed manner because the folder template is a little different for the plugins but I was able to give a general idea
over this shall I add some examples and refer to these configuration-as-code.yaml for the user?

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see inline review

docs/PLUGINS.md Outdated

##### **Location of configuration-as-code.yml:**

The `configuration-as-code.yml` file should be located within the test resources directory (`src/test/resources`) of your project repository. Specifically, it should be placed in the same directory where your test classes reside.
Copy link
Member

@timja timja Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go in the next section (configuration test) as it hasn't been mentioned about a configuration file yet, you could probably add an example file with the file path? content looks good though, almost there thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timja I have added more information please do let me know if anything is wrong or If I need to add something more

@timja timja added the documentation A PR that adds to documentation - used by Release Drafter label Mar 27, 2024
docs/PLUGINS.md Outdated Show resolved Hide resolved
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@timja timja enabled auto-merge (squash) March 27, 2024 22:19
@timja timja merged commit 5603ec6 into jenkinsci:master Mar 27, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A PR that adds to documentation - used by Release Drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants