Requirement is to expose the endpoints of a jenkins job to an external service. To invoke the jenkins job remotely using an api call
Related
We have a problem with Azure pipeline.
Inside pipeline we are running integration tests, those tests interacts with Docker Rest API to run specific containers (we are using Docker.DotNet for that). Everything works on on-premise hosted build agent, but doesn't on Microsoft-hosted (Ubuntu based). All calls to Docker REST API ends with timeout exception.
Does Docker engine in Microsoft-hosted Ubuntu build agent contains Docker REST API?
I couldn't get the differences or better say the benefits of using docker-agent or docker-inbound-agent for Jenkins as part of Cloud Nodes.
currently, I am using the routine Docker configuration for Configuration Cloud to use docker as agent to build application.
Jenkins Controller running on Host#1
another host for running docker agents!
base on GitHub readme:
docker-inbound-agent is using TCP or WebSockets to establish inbound connection to the Jenkins master.
docker-agent
docker-inbound-agent
According the docker-agent readme on github :
This image is used as the basis for the Docker Inbound Agent image. In
that image, the container is launched externally and attaches to
Jenkins.
This image may instead be used to launch an agent using the Launch
method of Launch agent via execution of command on the master.
docker-agent is used to launch an agent with a command on the master :
This launch the agent on the master.
docker-inbound-agent got the docker-agent image as basis (see on a Dockerfile) :
ARG version=latest-alpine-jdk11
FROM jenkins/agent:$version
This image was before named jnlp-slave (see this link) which got the same goal. This setup an agent which connect to the jenkins using the TCP protocol.
You also have a third agent, the docker-ssh-agent which is used to be connected to the master with SSH.
I've a gitlab container and i've a jenkins container locally. I can configured the CI, but but i can't solve the cd. I would like to when i push the code to repo the jenkins build my Blazor Server App solution in docker container locally.
Can you help me ?
Setup a Gitlab webhook like so: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html
set up a Jenkins pipeline with the necessary information inside a jenkinsfile like so: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/
The Gitlab webhook should send a request to the local jenkins container to execute the pipeline. You will need to make sure the appropriate ports are opened and linked between the container and the host computer.
I am having Jenkins in my virtual machine Azure .i need to access it with URL remotely from outside.
No matter which the steps you have done, create the VM with a cloud-init file to install the Jenkins, or create the VM and then install the Jenkins. There is no difference.
You need to open port 8080 for Jenkins traffic and port 1337 for the Node.js app. If you finish all the settings of Jenkins, then you can browse the Jenkins with the VM public IP and the port 8080 outside the VM, the URL like this: http://vmPublicIps:8080. Get all the steps from Create a VM in Azure with Jenkins.
Or you can just create a Jenkins Server with the image that Azure provided, see Create a Jenkins server on an Azure Linux VM from the Azure portal.
I have a docker container in Openshift, this docker have a spring boot microservice that I want to execute only every X minutes.
How I can do it using Openshift?
I don't know how to create a cron job or similar to launch this microservice every X minutes.
Thanks!
Assuming you are exposing an http service, you may use a mix between cron in docker and curl with cron, you can configure a cron inside your docker container to send a curl request periodically, invoking your microservice.