Skip to content
Snippets Groups Projects
Commit 45a2987f authored by Malte Bauch's avatar Malte Bauch Committed by Martin Stiemerling
Browse files

Extend CI/CD to push plugin-registry to the projects container-registry

See merge request !486
parent d0d6d219
Branches
Tags
1 merge request!486Extend CI/CD to push plugin-registry to the projects container-registry
Pipeline #155907 failed
...@@ -59,3 +59,15 @@ build-arista-routing-engine-image: ...@@ -59,3 +59,15 @@ build-arista-routing-engine-image:
- docker tag "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$TAG" "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$NEWTAG" - docker tag "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$TAG" "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$NEWTAG"
- docker push "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$NEWTAG" - docker push "$ARISTA_ROUTING_ENGINE_IMAGE_NAME:$NEWTAG"
<<: *build <<: *build
build-plugin-registry-image:
script:
- PLUGIN_REGISTRY_IMAGE_NAME="${CI_REGISTRY_IMAGE}/plugin-registry"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build -t "$PLUGIN_REGISTRY_IMAGE_NAME:$TAG" -f "${CI_PROJECT_DIR}/plugin-registry/plugin-registry.Dockerfile" --build-arg "GOLANG_VERSION=$GOLANG_VERSION" --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" .
- docker push "$PLUGIN_REGISTRY_IMAGE_NAME:$TAG"
# replace all slashes in the tag with hyphen, because slashes are not allowed in tags
- NEWTAG=${CI_COMMIT_BRANCH//\//-}
- docker tag "$PLUGIN_REGISTRY_IMAGE_NAME:$TAG" "$PLUGIN_REGISTRY_IMAGE_NAME:$NEWTAG"
- docker push "$PLUGIN_REGISTRY_IMAGE_NAME:$NEWTAG"
<<: *build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment