I’m trying to set up so that my scala tests are run on git push.
I run locally on MacOS, and the Ci/Cd is run on Linux, so some things are a bit of a mystery.
It appears sbt is not installed by default. So I took at look at this
stack overflow question
. It suggests I need to do the following:
But that seems to be problematic. The error messages claim there is something wrong on the typesafe side. Has anyone seen something like this before?
70 $ dpkg -i repo-deb-build-0002.deb
71 Selecting previously unselected package typesafe-repo.
72 (Reading database ... 4394 files and directories currently installed.)
73 Preparing to unpack repo-deb-build-0002.deb ...
74 Unpacking typesafe-repo (2.0-build-0003) ...
75 Setting up typesafe-repo (2.0-build-0003) ...
76 Warning: The postinst maintainerscript of the package typesafe-repo
77 Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
78 Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
79 Note: Check first if apt-key functionality is needed at all - it probably isn't!
80 E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
81 dpkg: error processing package typesafe-repo (--install):
82 installed typesafe-repo package post-installation script subprocess returned error exit status 255
83 Errors were encountered while processing:
84 typesafe-repo
88 ERROR: Job failed: exit code 1
That’s promising, but there is a warning about parsing the output of curl.
Screenshot 2020-02-17 at 13.19.14697×439 70.8 KB
What do you intend to accomplish with ... | apt-key add? I fear it’s not working as you intended?
Screenshot 2020-02-17 at 13.21.52714×320 41.1 KB
OK, now I have some success. Here is the content of the .gitlab.yml file which seems to work. Apparently apt-get install sbt installs scala but not java, so I have to also install default-jdk.
Disclaimer I am not an expert in CI but you shouldn’t need to install all that every time.
I haven’t used gitlab, but the tools I have worked with usually run in some containerized environment which let you specify a base image which had the base tools already installed.
Thanks for the suggestion. In the mean time, my system admin helped me set one up.
Here is the script file.