prplos/.gitlab/docker/builder/gitlab.yml
Petr Štetiar 635d4f72ce
ci: fix container paths using designated branch slug
Having slash in new `prpl/nightly` branch name causes issues with the
container paths:

 The push refers to repository [registry.gitlab.com/prpl-foundation/prplos/prplos/prpl/nightly/builder]
 ...
 denied: requested access to the resource is denied

So lets fix it by introducing new `CI_DESIGNATED_BRANCH_SLUG` variable
and use it appropriately.

Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:18:41 +00:00

26 lines
1000 B
YAML

build Docker image builder:
extends: .build Docker image
variables:
DOCKER_DOCKERFILE_PATH: .gitlab/docker/builder
test Docker image builder:
stage: docker test
extends: .docker in docker
needs: ["build Docker image builder"]
script:
- export IMAGE_NAME="$(echo $CI_JOB_NAME | sed 's/test Docker image \(.*\)/\1/')"
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker pull "$CI_REGISTRY_IMAGE/$CI_DESIGNATED_BRANCH_SLUG/$IMAGE_NAME:$CI_COMMIT_REF_SLUG"
- >
docker run --rm "$CI_REGISTRY_IMAGE/$CI_DESIGNATED_BRANCH_SLUG/$IMAGE_NAME:$CI_COMMIT_REF_SLUG" sh -c "
git clone --depth 1 https://gitlab.com/prpl-foundation/prplOS/prplos &&
cd prplos && scripts/gen_config.py x86_64 prpl &&
make -j $(nproc) tools/flock/compile &&
python3 -c 'import jira; import jwt'
"
deploy Docker image builder:
stage: docker deploy
needs: ["test Docker image builder"]
extends: .deploy Docker image