Skip to content

Use the API to fetch the remote default branch

Achilleas Pipinellis requested to merge axil-default-branch-api into main

A simpler and quicker way to fetch the default branch of a remote Git URL.

Test locally

  1. Check that building the latest image fails:
    docker build --build-arg NANOC_ENV=production --build-arg=CI_COMMIT_REF_NAME=main -t docs:latest -f Dockerfile.main .
  2. Build the base image that includes jq !1886 (merged)
    docker build -t registry.gitlab.com/gitlab-org/gitlab-docs:base -f dockerfiles/Dockerfile.gitlab-docs-base .
  3. Build the bootstrap image:
    docker build -t registry.gitlab.com/gitlab-org/gitlab-docs:bootstrap -f dockerfiles/Dockerfile.bootstrap .
  4. Build the latest image and see it succeeding:
    docker build --build-arg NANOC_ENV=production --build-arg=CI_COMMIT_REF_NAME=main -t docs:latest -f Dockerfile.main .

After this is merged

  1. Find the latest scheduled pipeline in https://gitlab.com/gitlab-org/gitlab-docs/-/pipelines and run the image:docs-latest job manually.
  2. Verify that the issue #1035 (closed) is fixed and close it.
Edited by Achilleas Pipinellis

Merge request reports