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

Official Docker Image #1

Open
unacceptable opened this issue Feb 23, 2021 · 2 comments
Open

Official Docker Image #1

unacceptable opened this issue Feb 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@unacceptable
Copy link

It would be great if this had an official docker image from you. Here is what I was thinking for a run syntax:

docker run -it mdubourg001/glci --only-jobs # or whatever extra args are provided.

Here is what I think that the Dockerfile should look like:

# docker build -t glci:local . && docker run -it glci:local

# I couldn't find a better image that worked (apparently python's a dependency)
FROM okdocker/pynode

RUN yarn global add glci # maybe we want to install from the local version?

ENTRYPOINT ["/usr/local/bin/glci"]
CMD ["--help"]

Here's an example of me running a local version of it:
Screen Shot 2021-02-23 at 7 44 32 AM

I'd be happy to help incorporate the CI portion of it if you want help.

Thanks for making some amazing tooling! This fills a need that I have had for some time, but was too lazy to try to tackle.

@mdubourg001
Copy link
Owner

Hi there,

The goal of glci is really to be used (ran) locally to "pre-validate" your CI Pipelines while making changes to them. As glci already creates a new Docker container for each CI job he runs and automatically removes it when the job succeeds or fails, why would you want to run glci itself in Docker ? I'm not sure to understand the purpose here, could you explain ?

However, thanks for your interest in the tool !

@unacceptable
Copy link
Author

@mdubourg001,

I can think of two use cases for this:

  1. For developers who want to run glci, but don't have glci or yarn installed locally, and don't want to install them on their system. I think that this approach is probably the future of a lot of CLI tools (in fact tools like trivy and hadolint are doing this now).
  2. CI as validation of a GitLab library (before that library is called) - This would also require a flag like --file to specify the yaml file to test. In gitlab this second use case would look something like this:
validate-gitlab-ci:
  stage: lint
  script:
  - find . -name "*.y*ml" -exec glci --file "{}" ";"
  image:
    name: mdubourg001/glci:0.0.3
    entrypoint:
      - '/usr/bin/env'
  except:
  - tags

Let me know what you think about these two use cases. I know that they are probably quite a bit different than what you initially imagined.

Respectfully,
Robert J.

@mdubourg001 mdubourg001 added the enhancement New feature or request label Mar 11, 2021
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

2 participants