summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-06 12:17:59 -0600
committermo khan <mo.khan@gmail.com>2020-08-10 15:04:15 -0600
commitd728dae390502f0b744f963fdb84d5aadcf2dff2 (patch)
tree05180ff07a681e5492a93ed84dc323823225d232
parent76fa7272e6f8fe623b5c129c2c8ba2696bb94207 (diff)
Install mono from custom built deb file
* Ensure mono deb job completes successfully * Sync the CA certificates
-rw-r--r--.gitlab/deb.yml1
-rw-r--r--Dockerfile12
-rw-r--r--lib/license/finder/ext/nuget.rb13
3 files changed, 11 insertions, 15 deletions
diff --git a/.gitlab/deb.yml b/.gitlab/deb.yml
index 20b7c93..27d5554 100644
--- a/.gitlab/deb.yml
+++ b/.gitlab/deb.yml
@@ -59,6 +59,7 @@ mono-6:
variables:
OMNIBUS_PROJECT: mono
MONO_VERSION: '6.8.0.123'
+ allow_failure: false
nodejs-10:
extends: .deb
diff --git a/Dockerfile b/Dockerfile
index ac5083f..9c175e3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,4 @@
# syntax = docker/dockerfile:experimental
-FROM debian:stable AS mono-builder
-RUN apt-get update -q
-RUN apt-get install --no-install-recommends -y apt-transport-https dirmngr gnupg ca-certificates
-RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
-RUN echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list
-RUN apt-get update -q
-RUN mv /etc/apt/apt.conf.d/docker-clean /etc/apt/apt.conf.d/docker-clean.bak
-RUN apt-get install -y --no-install-recommends nuget referenceassemblies-pcl ca-certificates-mono
-RUN mkdir -p /opt/toolcache && cp /var/cache/apt/archives/*.deb /opt/toolcache/
-
FROM debian:stable-slim
ENV ASDF_DATA_DIR="/opt/asdf"
ENV PATH="${ASDF_DATA_DIR}/shims:${ASDF_DATA_DIR}/bin:/opt/gitlab/.local/bin:${PATH}"
@@ -16,7 +6,7 @@ ENV TERM="xterm"
WORKDIR /opt/gitlab
COPY config/01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc
RUN mkdir -p /opt/toolcache
-COPY --from=mono-builder /opt/toolcache/*.deb /opt/toolcache/mono/
+COPY pkg/mono*.deb /opt/toolcache/
COPY pkg/license*.deb /opt/toolcache/
COPY pkg/rust*.deb /opt/toolcache/
COPY config/install.sh /opt/install.sh
diff --git a/lib/license/finder/ext/nuget.rb b/lib/license/finder/ext/nuget.rb
index 17674e6..5e689d4 100644
--- a/lib/license/finder/ext/nuget.rb
+++ b/lib/license/finder/ext/nuget.rb
@@ -3,11 +3,16 @@
module LicenseFinder
class Nuget
def prepare
- shell.execute(['apt-get', :install, '-y', '/opt/toolcache/mono/*.deb'])
+ shell.execute(['apt-get', :install, '-y', '/opt/toolcache/mono*.deb'])
create_vendor_path
Dir.chdir(project_path) do
shell.execute([
- :mono, '/usr/local/bin/nuget.exe',
+ '/opt/asdf/installs/mono/6.8.0.123/bin/cert-sync',
+ shell.default_certificate_path
+ ])
+ shell.execute([
+ '/opt/asdf/installs/mono/6.8.0.123/bin/mono',
+ '/opt/asdf/installs/mono/6.8.0.123/bin/nuget.exe',
:restore, detected_package_path,
'-LockedMode',
'-NoCache',
@@ -17,8 +22,8 @@ module LicenseFinder
end
end
- def installed?(*args)
- File.exist?('/usr/local/bin/nuget.exe')
+ def installed?(*)
+ true
end
def current_packages