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>
23 lines
868 B
YAML
23 lines
868 B
YAML
build Docker image testbed:
|
|
extends: .build Docker image
|
|
variables:
|
|
DOCKER_DOCKERFILE_PATH: .gitlab/docker/testbed
|
|
|
|
test Docker image testbed:
|
|
stage: docker test
|
|
extends: .docker in docker
|
|
needs: ["build Docker image testbed"]
|
|
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 "
|
|
python3 -c 'import labgrid; import yaml; import jira; import jwt; import cdrouter' && tmate -V
|
|
"
|
|
|
|
deploy Docker image testbed:
|
|
stage: docker deploy
|
|
extends: .deploy Docker image
|
|
needs: ["test Docker image testbed"]
|