From 70693e51ea850a574342ed7663716c4851e78209 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Sat, 11 Jan 2020 13:53:44 +0000 Subject: [PATCH] Update sdk to v0.13.0 and install dhall-to-json This change adds a couple of new tools in the operator image. This change also disables the CI job and the follow-up changes will re-active it step by step. Change-Id: I106b34a5e11aec5e88ca2f491c69c82527551952 --- .zuul.yaml | 9 +++++---- Makefile | 2 ++ build/Dockerfile | 23 ++++++++++++++++++++++- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Makefile diff --git a/.zuul.yaml b/.zuul.yaml index 4191042..4df1d2c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -22,14 +22,15 @@ - context: . dockerfile: build/Dockerfile repository: zuul/zuul-operator + - project: check: jobs: - zuul-operator-build-image - - zuul-operator-functional-k8s: - dependencies: zuul-operator-build-image + # - zuul-operator-functional-k8s: + # dependencies: zuul-operator-build-image gate: jobs: - zuul-operator-build-image - - zuul-operator-functional-k8s: - dependencies: zuul-operator-build-image \ No newline at end of file + # - zuul-operator-functional-k8s: + # dependencies: zuul-operator-build-image diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3ac351f --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +image: + podman build -f build/Dockerfile -t docker.io/zuul/zuul-operator . diff --git a/build/Dockerfile b/build/Dockerfile index 2502a42..c6f63df 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,26 @@ -FROM quay.io/operator-framework/ansible-operator:v0.6.0 +FROM quay.io/operator-framework/ansible-operator:v0.13.0 +# Install extra requirements +USER root + +# See: https://github.com/operator-framework/operator-sdk/issues/2384 +RUN pip3 install --upgrade openshift + +# unarchive: bzip2 and tar +# generate zuul ssh-keys or certificate: openssh and openssl +# manage configuration: git +RUN dnf install -y bzip2 tar openssh openssl git + +# Install dhall-to-json +RUN curl -OL https://github.com/dhall-lang/dhall-haskell/releases/download/1.29.0/dhall-json-1.6.1-x86_64-linux.tar.bz2 \ + && echo "7e65f933fb215629d18d23bc774688c598d4c11b62865f3546ee23ae36b25290 dhall-json-1.6.1-x86_64-linux.tar.bz2" | sha256sum -c \ + && tar -xf dhall-json-1.6.1-x86_64-linux.tar.bz2 --strip-components=2 -j --mode='a+x' -C /usr/bin \ + && rm dhall-json-1.6.1-x86_64-linux.tar.bz2 + +# Back to the default operator user +USER 1001 + +# Copy ansible operator requirements COPY watches.yaml ${HOME}/watches.yaml COPY ansible/zuul.yaml ${HOME}/zuul.yaml