[librsvg-oci-images/add-gitlab-clippy] Install gitlab-clippy on all images




commit 60d6a9673c872ce59f8bd7c0d6a3e87dcba572e1
Author: Sven Neumann <sven svenfoo org>
Date:   Thu Oct 29 20:56:29 2020 +0100

    Install gitlab-clippy on all images
    
    Install gitlab-clippy (and cargo-c where it's not packaged) into
    /opt/cargo and adjust the PATH environment so that it can be run
    from there easily.
    
    Also rename the Dockerfiles for opensuse and fedora as it was done
    for debian:testing recently.

 .gitlab-ci.yml                                 |  4 ++--
 debian/testing.Dockerfile                      | 14 +++++++++-----
 fedora/{latest => latest.Dockerfile}           |  6 +++++-
 opensuse/{tumbleweed => tumbleweed.Dockerfile} |  9 +++++++--
 4 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1160867..74dc0ce 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -62,7 +62,7 @@ fedora latest:
     ARCH: "amd64"
     DISTRO_NAME: "fedora"
     DISTRO_VER: "latest"
-    DOCKERFILE: "fedora/latest"
+    DOCKERFILE: "fedora/latest.Dockerfile"
     CONTEXT_DIR: "fedora"
   only:
     changes:
@@ -86,7 +86,7 @@ opensuse tumbleweed:
     ARCH: "amd64"
     DISTRO_NAME: "opensuse"
     DISTRO_VER: "tumbleweed"
-    DOCKERFILE: "opensuse/tumbleweed"
+    DOCKERFILE: "opensuse/tumbleweed.Dockerfile"
     CONTEXT_DIR: "opensuse"
   only:
     changes:
diff --git a/debian/testing.Dockerfile b/debian/testing.Dockerfile
index 596681d..bd43450 100644
--- a/debian/testing.Dockerfile
+++ b/debian/testing.Dockerfile
@@ -1,5 +1,7 @@
 FROM debian:testing
 
+ENV SHELL=/bin/bash
+
 RUN apt update -yqq \
     && apt install -yqq --no-install-recommends \
     curl gcc make valac rustc cargo git \
@@ -8,12 +10,14 @@ RUN apt update -yqq \
     gtk-doc-tools libpango1.0-dev libgtk-3-dev \
     libxml2-dev libcroco3-dev libcairo2-dev \
     ca-certificates openssl libssl-dev \
-    autotools-dev libltdl-dev autopoint \
-    && apt clean \
-    && rm -rf /var/lib/apt/lists \
-    && cargo install cargo-c
+    autotools-dev libltdl-dev autopoint
+RUN apt clean && rm -rf /var/lib/apt/lists
 
-ENV SHELL=/bin/bash
+RUN mkdir -p /opt/cargo &&
+    cargo install --root /opt/cargo cargo-c && \
+    cargo install --root /opt/cargo gitlab_clippy
+
+ENV PATH="${PATH}:/opt/cargo/bin"
 
 ENV HOST_USER_ID 5555
 RUN useradd -u $HOST_USER_ID -ms /bin/bash user
diff --git a/fedora/latest b/fedora/latest.Dockerfile
similarity index 87%
rename from fedora/latest
rename to fedora/latest.Dockerfile
index 0d18559..f157ca3 100644
--- a/fedora/latest
+++ b/fedora/latest.Dockerfile
@@ -8,9 +8,13 @@ RUN dnf upgrade -y && \
     libxml2-devel libcroco-devel cairo-devel pango-devel \
     gettext-devel && \
     dnf install -y 
https://kojipkgs.fedoraproject.org//packages/rust-cargo-c/0.5.2/3.fc32/x86_64/cargo-c-0.5.2-3.fc32.x86_64.rpm
-
 RUN dnf clean all
 
+RUN mkdir -p /opt/cargo &&
+    cargo install --root /opt/cargo gitlab_clippy
+
+ENV PATH="${PATH}:/opt/cargo/bin"
+
 # Enable sudo for wheel users
 RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' \
     /etc/sudoers
diff --git a/opensuse/tumbleweed b/opensuse/tumbleweed.Dockerfile
similarity index 78%
rename from opensuse/tumbleweed
rename to opensuse/tumbleweed.Dockerfile
index 6a5f725..7e92623 100644
--- a/opensuse/tumbleweed
+++ b/opensuse/tumbleweed.Dockerfile
@@ -9,8 +9,13 @@ RUN zypper update -y && \
     gtk-doc gobject-introspection-devel gtk3-devel \
     libxml2-devel libcroco-devel cairo-devel \
     pango-devel gdk-pixbuf-devel ccache gettext-tools \
-    sudo shadow system-group-wheel xz && \
-    zypper clean -a
+    sudo shadow system-group-wheel xz
+RUN zypper clean -a
+
+RUN mkdir -p /opt/cargo &&
+    cargo install --root /opt/cargo gitlab_clippy
+
+ENV PATH="${PATH}:/opt/cargo/bin"
 
 # Enable sudo for wheel users
 RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]