diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e1ba2513af54a9bef7549b279dfb75ee73780c4..3236cdcf867ca2e19acfd7267fe6fd505d13cd0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,6 +89,21 @@ build_tango-java: - docker/tango/tango-dependencies/**/* - docker/tango/tango-java/**/* +build_tango-dsconfig: + retry: 2 + stage: build_3 + tags: + - docker-executor + script: + - cd docker/tango/tango-dsconfig + - make DOCKER_BUILD_ARGS="--no-cache" DOCKER_REGISTRY_USER=$DOCKER_REGISTRY_USER DOCKER_REGISTRY_HOST=$DOCKER_REGISTRY_HOST build + - make DOCKER_REGISTRY_USER=$DOCKER_REGISTRY_USER DOCKER_REGISTRY_HOST=$DOCKER_REGISTRY_HOST push + only: + changes: + - docker/tango/tango-dependencies/**/* + - docker/tango/tango-cpp/**/* + - docker/tango/tango-dsconfig/**/* + build_ska-python-buildenv: retry: 2 stage: build_3 diff --git a/charts/Makefile b/charts/Makefile index 85172325a85d2f643b88c9ec12b4fabcdf07a1be..7f2f1f5ffe3ca431bb743a3c6fd61fe42500e45d 100644 --- a/charts/Makefile +++ b/charts/Makefile @@ -81,6 +81,14 @@ delete: ## delete the helm chart release (with Tiller) @helm tiller run $(KUBE_NAMESPACE) -- helm delete $(HELM_RELEASE) --purge \ --tiller-namespace $(KUBE_NAMESPACE) +delete_template: ## delete the helm chart release + @helm template ska-docker/ --name $(HELM_RELEASE) \ + --namespace $(KUBE_NAMESPACE) \ + --tiller-namespace $(KUBE_NAMESPACE) \ + --set display="$(DISPLAY)" \ + --set xauthority="$(XAUTHORITYx)" \ + --set tangoexample.debug="$(REMOTE_DEBUG)" | kubectl -n $(KUBE_NAMESPACE) delete -f - + tests: ## run Helm chart tests @helm tiller run $(KUBE_NAMESPACE) -- helm test $(HELM_RELEASE) --cleanup diff --git a/docker/tango/tango-dsconfig/.release b/docker/tango/tango-dsconfig/.release new file mode 100644 index 0000000000000000000000000000000000000000..234f3139463641354fbf541cc4111157c5fae56f --- /dev/null +++ b/docker/tango/tango-dsconfig/.release @@ -0,0 +1,2 @@ +release=0.1.0 +tag=tango-dsconfig-0.1.0 diff --git a/docker/tango/tango-dsconfig/Dockerfile b/docker/tango/tango-dsconfig/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..59eee3cbe1221c2657dbe8fed471db6970cd0429 --- /dev/null +++ b/docker/tango/tango-dsconfig/Dockerfile @@ -0,0 +1,30 @@ +ARG DOCKER_REGISTRY_USER +ARG DOCKER_REGISTRY_HOST +FROM ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-cpp:latest + +USER root + +# Speed up image builds by adding apt proxy if detected on host +RUN DOCKERHOST=`awk '/^[a-z]+[0-9]+\t00000000/ { printf("%d.%d.%d.%d", "0x" substr($3, 7, 2), "0x" substr($3, 5, 2), "0x" substr($3, 3, 2), "0x" substr($3, 1, 2)) }' < /proc/net/route` \ + && /usr/local/bin/wait-for-it.sh --host=$DOCKERHOST --port=3142 --timeout=3 --strict --quiet -- echo "Acquire::http::Proxy \"http://$DOCKERHOST:3142\";" > /etc/apt/apt.conf.d/30proxy \ + && echo "Proxy detected on docker host - using for this build" || echo "No proxy detected on docker host" + +# Install build dependencies: +# +# * build-essential installs C/C++ compilers and build tools +# * libboost-python-dev is required to bind PyTango to the C++ Tango libs +# * pkg-config is used to locate required libraries +# * virtualenv is required to create a new Python virtualenv environment +# +RUN buildDeps='build-essential \ + libboost-python-dev \ + pkg-config \ + git \ + python-setuptools \ + python-pip \ + virtualenv' \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && apt-get -y install --no-install-recommends $buildDeps + +RUN pip install wheel +RUN pip install --no-cache-dir --extra-index-url=https://pypi.org/simple -i https://nexus.engageska-portugal.pt/repository/pypi/simple python-dsconfig==1.2.5 \ No newline at end of file diff --git a/docker/tango/tango-dsconfig/Makefile b/docker/tango/tango-dsconfig/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9f046a948604496191fe3dcfb695d21018b6435b --- /dev/null +++ b/docker/tango/tango-dsconfig/Makefile @@ -0,0 +1,7 @@ +include ../../make/Makefile + +pre-build: + @echo do some stuff before the docker build + +post-build: + @echo do some stuff after the docker build \ No newline at end of file