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

please delete #2047

Closed
ghost opened this issue Nov 4, 2022 · 15 comments
Closed

please delete #2047

ghost opened this issue Nov 4, 2022 · 15 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Nov 4, 2022

No description provided.

@ghost ghost added the enhancement New feature or request label Nov 4, 2022
@nvuillam
Copy link
Member

nvuillam commented Nov 4, 2022

That's a great idea, i don't know drone CI but maybe we can work together to complete the doc and add a section:)

ML is docker image based and there is also mega-linter-runner so i'm sure that we can build a reusable template configuration:)

@nvuillam
Copy link
Member

nvuillam commented Nov 4, 2022

When you look to github, gitlab, azure etc... job scripts, isn't there something reusabke for drone CI? :)

@echoix
Copy link
Collaborator

echoix commented Nov 4, 2022

The local runner is really only an abstraction to use the Docker image. By using it with the --debug option (correct me @nvuillam), you will see the command line that is sent to Docker.

The two important lines of the local runner are really:

commandArgs.push(...["-v", "/var/run/docker.sock:/var/run/docker.sock:rw"]);
commandArgs.push(...["-v", `${lintPath}:/tmp/lint:rw`]);

This sets the volume mounts. The first one is to allow MegaLinter to control Docker. (Probably for the Docker based linters). Then the second one is really to mount the repo to lint inside the container, so the container can access the files. That's how à Docker container can communicate files, and persist them, since otherwise, containers are generic and stateless!

The CI actions or jobs, call directly the Docker container like in here, the GitHub action definition, the
https://github.com/oxsecurity/megalinter/blob/8376adfd5bfe9cd934f2c8783b0fa6d9d509d0fa/action.yml

I'm not 100% sure how the repo files mounting is set in that case, but I think this could help you start your integration project!

@nvuillam
Copy link
Member

nvuillam commented Nov 5, 2022

Syntax seems quite simple and close to other CI providers

https://docs.drone.io/pipeline/docker/syntax/steps/

Could you try something like:

kind: pipeline
type: docker
name: MegaLinter

steps:
- name: megalinter
  image: oxsecurity/megalinter:v6

@ghost ghost mentioned this issue Nov 6, 2022
@nvuillam
Copy link
Member

nvuillam commented Nov 6, 2022

@NebulaOnion great :)
I checked in the docs and did not see artifacts... that's sad :/

  • Enabling file.io reporter could be a workaround solution for a start
  • DRONE_COMMENTS_REPORTER could be nice, but how to we post comments on drone ? it would require a new python class within MegaLinter, similar to Github, Gitlab and Azure reporters
  • About auto-commit of fixes, it is currently documented only for Github Actions, but if Drone is able to push a new commit that could do the job :)

@nvuillam
Copy link
Member

nvuillam commented Nov 6, 2022

Agreed, you can make a first PR with doc for what already works, then the new features about drone CI integration can be managed in other issues & PRs :)

@nvuillam
Copy link
Member

nvuillam commented Nov 6, 2022

Another thing: if there is something in drone CI to group console output into sections, it would be nice to implement it too :)

@ghost ghost mentioned this issue Nov 6, 2022
4 tasks
@nvuillam
Copy link
Member

nvuillam commented Nov 6, 2022

Nice proposition, agreed :)

@nvuillam
Copy link
Member

@NebulaOnion oops... please can you make a PR to update doc once you have a config working ?

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 20, 2022
@nvuillam nvuillam removed the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 20, 2022
@nvuillam
Copy link
Member

nvuillam commented Dec 29, 2022

@NebulaOnion a PR with updated doc + updated installer to have a Drone CI config template would indeed be great :)

About generator, it will probably be something like:

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Jan 29, 2023
@bdovaz bdovaz removed the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Jan 29, 2023
@bdovaz
Copy link
Collaborator

bdovaz commented Jan 29, 2023

@NebulaOnion but are you still working or going to work on a PR? Because right now the only one apparently interested and knowledgeable in this topic is you so if you don't advance somehow in a PR I'm afraid it will fall back into stale.

@ghost ghost closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2023
@nvuillam
Copy link
Member

@bdovaz We don't use Drone CI anymore and I honestly don't know how to keep fixing the remaining issues, I'll close the issue, then.

@NebulaOnion what CI did you decide to use?
Is MegaLinter still in the pipeline? :)

@nvuillam
Copy link
Member

nvuillam commented Feb 2, 2023

@NebulaOnion oh great, another CI tool that could use MegaLinter :)

Please make a PR to update the installation instructions if you succeed to run MegaLinter on Gitea :)

@ghost ghost changed the title Drone CI support please delete Jun 28, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants