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

slim ci-cd-integration #583

Open
TomiwaAribisala-git opened this issue Sep 16, 2023 · 4 comments
Open

slim ci-cd-integration #583

TomiwaAribisala-git opened this issue Sep 16, 2023 · 4 comments

Comments

@TomiwaAribisala-git
Copy link
Contributor

Integrating Slim across CI/CD environments is showcased in the repo, however, there should be demonstrated examples across CI/CD environments.

@TomiwaAribisala-git
Copy link
Contributor Author

Hello @kcq, about demonstrated examples of using Slim across CI/CD environments, I have uploaded a use case for Jenkins and Github Actions here--https://github.com/TomiwaAribisala-git/slim-ci-cd-integration, I look forward to your favorable response, thanks.

@ybalcanci
Copy link

ybalcanci commented Dec 15, 2023

Hello, I am trying to integrate slim into my Jenkins pipeline for my nodejs backend image as well. However, slim is trying to run the container on build command and my image doesn't run because it cannot connect to any database in pipeline. What do you suggest for this? Should I create database specificly for it to connect to during Jenkins pipeline?

Some details:
I am not running a SaaS application or anything. I ship my database as another docker image so that the output image of my Jenkins nodejs pipeline and the database image can be run together using docker compose. It's not even only the 2 of them. I have several repositories and several Jenkins jobs to create images that will result in an application. And the containers have socket connections and api calls to each other etc. I know that docker compose file can be passed to slim but in a specific Jenkins job, it doesn't have access to all images so it can't run docker compose up [-d] successfully either. Should I make every image available to Jenkins so that it can successfully analyze them in pipeline or should I avoid trying to use slim in Jenkins for such a complicated case?

@kcq
Copy link
Member

kcq commented Dec 17, 2023

Hello, I am trying to integrate slim into my Jenkins pipeline for my nodejs backend image as well. However, slim is trying to run the container on build command and my image doesn't run because it cannot connect to any database in pipeline. What do you suggest for this? Should I create database specificly for it to connect to during Jenkins pipeline?

Some details: I am not running a SaaS application or anything. I ship my database as another docker image so that the output image of my Jenkins nodejs pipeline and the database image can be run together using docker compose. It's not even only the 2 of them. I have several repositories and several Jenkins jobs to create images that will result in an application. And the containers have socket connections and api calls to each other etc. I know that docker compose file can be passed to slim but in a specific Jenkins job, it doesn't have access to all images so it can't run docker compose up [-d] successfully either. Should I make every image available to Jenkins so that it can successfully analyze them in pipeline or should I avoid trying to use slim in Jenkins for such a complicated case?

@ybalcanci If the database is the only "must have" dependency for your image than one of the options is to reference an existing database running somewhere using an environment variable (assuming your image supports passing the database connection string through an environment variable). For example, in some of my tests I have a SaaS hosted database and then I add an --env flag to the slim build command to pass the database connection string for it. If your image has other external container dependencies too (beyond just that database dependency) than you can try to use the same env var approach or you can try using the compose functionality in slim (yes, if you go this direction you'll need to make sure the images referenced in the compose file are accessible in your Jenkins job)

@ybalcanci
Copy link

@kcq I see, thanks for the clarification.

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

3 participants