]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
CI containers: README and naming
authorVasek Sraier <git@vakabus.cz>
Sun, 21 Feb 2021 20:56:52 +0000 (21:56 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 8 Apr 2022 14:17:51 +0000 (16:17 +0200)
manager/.gitlab-ci.yml
manager/ci/README.md [new file with mode: 0644]

index 79e7f73f5835608164fa85a568476f7e8076be36..b667a9fb5b4d8997842ca3ecb769b6f141c10d98 100644 (file)
@@ -2,27 +2,30 @@ stages:
   - build
   - check
 
-image: $CI_REGISTRY/knot/knot-resolver-manager/ci/devenv:latest
+image: $CI_REGISTRY/knot/knot-resolver-manager/devenv:latest
 
-build:
-  image: docker:19.03.12
-  stage: build
-  services:
-    - docker:19.03.12-dind
-  variables:
-    IMAGE_TAG: $CI_REGISTRY/knot/knot-resolver-manager/ci/devenv:latest
-  script:
-    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-    - docker build -t $IMAGE_TAG ci/devenv
-    - docker push $IMAGE_TAG
+# Ideally, the CI would build it's own container and use it afterwards. This workflow should be supported,
+# at least according to the GitLab documentation:
+# https://gitlab.nic.cz/help/user/packages/container_registry/index#container-registry-examples-with-gitlab-cicd
+# Sadly, it does not work on our infrastructure. I did not however test it thoroughly and/or consulted it with
+# anyone else. So it might be fixable. For now, let's leave the config here and we might fix it in the future.
+#
+# build:
+#   image: docker:19.03.12
+#   stage: build
+#   services:
+#     - docker:19.03.12-dind
+#   variables:
+#     IMAGE_TAG: $CI_REGISTRY/knot/knot-resolver-manager/ci/devenv:latest
+#   script:
+#     - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+#     - docker build -t $IMAGE_TAG ci/devenv
+#     - docker push $IMAGE_TAG
 
 # FIXME - use custom Docker image, so that we don't rebuild it all every single time
 lint:
   image: debian:latest
   stage: check
-  variables:
-    # Python by default uses ascii encoding, which does not work, because source files are in UTF-8. Here is a potential solution, but for newer Python https://www.python.org/dev/peps/pep-0540/
-    LC_ALL: C.UTF-8
 
   cache:
     key: "check:always-the-same-cache"
diff --git a/manager/ci/README.md b/manager/ci/README.md
new file mode 100644 (file)
index 0000000..c6f692d
--- /dev/null
@@ -0,0 +1,9 @@
+Docker Build
+------------
+
+```
+$ docker build --no-cache -t registry.nic.cz/knot/knot-resolver-manager/devenv:latest devenv
+
+$ docker login registry.nic.cz
+$ docker push registry.nic.cz/knot/knot-resolver-manager/devenv:latest
+```