Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
stages:
- build

variables:
CONTAINER_IMAGE: ergw/vpp-test
CONTAINER_IMAGE_BUILT: ${CONTAINER_IMAGE}:${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHA}
CONTAINER_IMAGE_LATEST: ${CONTAINER_IMAGE}:latest
CI_REGISTRY: index.docker.io # container registry URL
CI_REGESTRY_IMAGE: https://index.docker.io/v1/


# build container image
build:
stage: build
#tags:
# - docker
image: docker:latest
services:
- docker:dind
script:
- export DOCKER_HOST="tcp://localhost:2375"
- echo "Building Dockerfile-based application..."
- docker build -t ${CONTAINER_IMAGE_BUILT} -f extras/docker/Dockerfile .
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
- echo "Pushing to the Container Registry..."
- docker push ${CONTAINER_IMAGE_BUILT}