>_ IzzyLab

Hands-on task

This task is step 8 of the course “Shipping a release”

Fetch the release from the artifact server

medium~7 min

CI published a build on the internal artifact server: http://localhost:8081/billing-2.4.0.tar.gz. Download the archive and extract it into the release directory /srv/billing/releases/2.4.0, so that bin/billing (executable) and conf/app.ini appear there.

What you'll practise:
  • curl -o
  • tar -xzf
  • tar -C
  • downloading an artifact
  • release layout

Topic breakdown

Delivering a release to a server almost always comes down to two steps: fetch the artifact over HTTP and unpack it into a version directory. By default curl writes the response body to the terminal, so the output file is specified explicitly, and the -f flag turns an HTTP error into a non-zero exit code — otherwise you may end up "extracting" a 404 HTML page. A .tar.gz archive is unpacked by tar in extract mode through gzip, with the destination set by -C: tar preserves file permissions, so executable binaries stay executable. Before extracting it's worth looking at the listing (-t) to see whether the archive has a top-level directory.

What's checked

  1. bin/billing extracted and executable
  2. this is build 2.4.0
  3. conf/app.ini in place

What it looks like