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

Gitlab CI #139

Closed
halamajan opened this issue Jan 12, 2021 · 10 comments
Closed

Gitlab CI #139

halamajan opened this issue Jan 12, 2021 · 10 comments

Comments

@halamajan
Copy link

Hi there!

I want to run plugin tests in Gitlab CI. My question is: Is it possible to run kong-pongo in Gitlab runner with Docker socket binding configuration (as described here)

CI job which I want to run kong-pongo script is docker container executed by Docker runner with following arguments:

docker run -v /var/run/docker.sock:/var/run/docker.sock -it docker:compose

There is problem because checkouted plugin repository is inside docker container and docker engine is running in host (Gitlab runner). Then I get following error message:

/kong-plugin # pongo run
Creating kong-pongo_kong_run ... done
Error response from daemon: Mounts denied: 
The path /kong-plugin is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/docker-for-mac for more info.

Regards,

Jan

@halamajan halamajan changed the title Gitlab CI with docker runner Gitlab CI Jan 12, 2021
@halamajan
Copy link
Author

@Tieske
Copy link
Member

Tieske commented Jan 12, 2021

have you tried the docker-in-docker instructions? see https://github.com/Kong/kong-pongo#running-pongo-in-docker

@halamajan
Copy link
Author

Sorry I missed that section the documentation. Thank you.

@Tieske
Copy link
Member

Tieske commented Jan 13, 2021

What were you looking for? can we improve the docs by changing the header?

@Tieske
Copy link
Member

Tieske commented Jan 13, 2021

maybe we should change it to "docker-in-docker" instead of "pongo in docker"

@halamajan
Copy link
Author

I was focused on section https://github.com/Kong/kong-pongo#setting-up-ci (which is Travis specific IMHO), and just missed this one.

@halamajan
Copy link
Author

halamajan commented Jan 13, 2021

maybe we should change it to "docker-in-docker" instead of "pongo in docker"

I do not think that the "Running pongo in docker" section is about "docker-in-docker", because what are you proposing is do Docker socket binding to the host which is not docker-in-docker.

@halamajan
Copy link
Author

@Tieske
Copy link
Member

Tieske commented Jan 13, 2021

That link is also in the "Running pongo in docker" section.

@Tieske
Copy link
Member

Tieske commented Jan 13, 2021

I'll probably add link to the ci section then

Tieske added a commit that referenced this issue Jan 14, 2021
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

No branches or pull requests

2 participants