Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Design and implement a versioning strategy for pipeline artifacts

A worked example

Single answer

A release pipeline retrieves a cleanup script directly from a Git repository without compiling or packaging it. The application build can stay the same while the script changes on main. Several releases can also retrieve the script from the same repository snapshot.

The script's artifact version must distinguish the repository snapshots used for retrieval and remain the same when releases reuse a snapshot.

Which value should the pipeline record as the script artifact's version?

Choose one answer
Why

Record the commit from which the pipeline retrieved the script. That identifies its source revision independently of the application build and remains consistent across releases that reuse it. A branch name identifies a changing reference rather than the specific revision.

  • Correct: The full Git commit ID used to retrieve the script. The retrieved commit identifies the script revision and remains the same when that revision is reused. This follows the source's commit-based version tracking for version-control artifacts.
  • Not correct: The application build ID associated with the deployment. An unchanged application build ID cannot distinguish these script revisions. The source states that a directly retrieved version-control artifact obtains its version information from version control rather than a build.
  • Not correct: The Git branch name used to retrieve the script. The branch name remains main as its script content changes. The source identifies specific commits as the basis for tracking versions of files and scripts.
  • Not correct: The release ID assigned when the script is deployed. Separate releases have separate release IDs even when they retrieve the same script revision. The source bases this artifact's version on its source-control commit.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free