Jenkins: node, stage, step


node allocates an executor on a Jenkins node (aka a slave) and runs code in the context of the workspace on that node.

Another wrinkle on node‘s. There is also the concept of flyweight and heavyweight executors. A flyweight executor is just a thread and runs inside the Java master’s JVM. A heavyweight executor is a process (e.g. sh ) and will halt the flow on the master so should be allocated to a node. From the docs:

It is recommended to allocate executors to agent machines, rather than on the Jenkins master – to avoid potential security vulnerabilities, Out-Of-Memory and other performance issues. To do this, configure the “# of executors” to ‘0’ on the “master” node (by default this setting is ‘2’).

See also


stage creates a labelled block and show up as columns in the Pipeline Stage view.

See also Jenkins: milestone plugin and this post on Stage vs Lock vs Milestone.


A step is a single action. When a step succeeds it moves onto the next step. When a step fails to execute correctly the Pipeline will fail.

See also


Note also the keyword steps


Docker: Apache container with sidecar

Why would you use a sidecar?

e.g. to add something to an existing container without rewriting it.

Assuming you’ve run a container with Apache as in this post: Docker: Apache container then you’ll have an environment variable, APP_ID.

You can use this to run a sidecar container that adds a health metric. E.g.

docker run --pid=container:${APP_ID} -p 8081:8081 brendanburns/topz:db0fa58 /server --addr=

and now you have a sidecar container running. E.g.

curl localhost:8081

91 9.937410610507195 0.02218294 /server --addr=
1 0 0.0024320167 httpd -DFOREGROUND
7 0 0.005011428 httpd -DFOREGROUND
8 0 0.0008106722 httpd -DFOREGROUND
9 0 0.0009335013 httpd -DFOREGROUND



Docker: Apache container

Running Apache in Docker from Ubuntu

Install Docker

curl -fsSL | sh


To allow you to use Docker as a user

sudo usermod -aG docker <username>


Run Docker with Apache image:

sudo docker run -dit –name apache -p 8080:80 -v /tmp/webroot:/usr/local/apache2/htdocs/ httpd:2.4

This will overwrite anything you’ve written to local webroot path.

Also, 8080:80 is host:container.

See also docker container run


And docker stop <your container name> will not delete that volume. It persists.


Test from local machine with:

curl localhost:8080


Note: you can access your container ID if you know the container name. E.g. assuming the container name is apache then you can use:

APP_ID=docker ps | grep apache | awk '{print $1}'