compose-ci | based container , listening to github webhooks | Continuous Deployment library
kandi X-RAY | compose-ci Summary
kandi X-RAY | compose-ci Summary
SaaS CIs are cool and all, but you clearly don't have the same flexibility as this \o/ This also prepares the environment with latest versions of docker and compose, making it a breeze to run your tests. It's self hosted. It can be used wherever docker is running.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Run the build
- Convert to HTML
- Send a failed message to the mailer
- Post a commit
- Create a pending commit
- Mark a commit as failed
- Reconfigure all services
- Pull images
- Login to project
- Return True if the result is successful
- Send a POST request
- Builds a docker container
- Fetch a tarball
- Send a email
- Execute tests
- Handle HTTP POST request
- Build Docker container
compose-ci Key Features
compose-ci Examples and Code Snippets
Community Discussions
Trending Discussions on compose-ci
QUESTION
I have a functional tests project for my ASP.NET Core 3.1 API that uses WebApplicationFactory to create a test server for the API. The tests pass locally and within a local docker-compose environment.
However when run on the GitLab CI server within the same docker-compose environment the WebApplication factory's CreateClient
method is blocking. When the test server starts the confluent Kafka Admin Service is blocking, i.e no confirmation log message is displayed confirming the topic created. I have created a small project on GitLab to highlight the issue.
The issue appears to be with the WebApplication test server and Confluent Kafka somehow, since I have created a docker-compose stack that starts the Software Under Test WebApp on GitLab CI and it starts successfully.
The Software Under Test contains Background / Hosted Services:
- Kafka Admin Service to create topic - this is blocking on CI server when using WebAppicationFactory test server
- Kafka Consumer
- MqttKafkaBridge
It also uses Autofac and starts a SignalR Hub.
Has anyone experienced similar issue/problems when using WebApplicationFactory
on a remote CI server such as Gitlab or Travis?
Is it because WebApplicationFactory.CreateClient()
creates a TestServer
that runs as localhost??
Test using WebApplicationFactory
Create a WebApplicationFactory for the Sofware Under Test and display console log message once created. When run on CI Server no console message is displayed for after the factory client has been created.
...ANSWER
Answered 2020-Nov-19 at 19:16After reading this aspnetcore issue discovered that the problem was with the implementation
of my IHostedService
implementation.
The StartAsync
method was performing the task, running until the request completed. By design this method is meant to be fire and forget, i.e. start the task and then continue. Updated my KafkaAdmin
service to be a BackgroundService
, overriding ExecuteAsync
method, as listed below.
Subsequently, tests no longer blocks.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install compose-ci
You can use compose-ci like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page