feat(ci): add Nix 2.19.3 for status-go builds (#14398)

Otherwise it fails with:
```
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
/tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix
```
Related to:
https://github.com/status-im/status-go/pull/4388

Signed-off-by: Alexis Pentori <alexis@status.im>
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-04-11 17:14:47 +03:00 committed by GitHub
parent f743d2f059
commit efd831eb08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 18 additions and 12 deletions

View File

@ -89,12 +89,18 @@ RUN GOLANG_SHA256="698ef3243972a51ddb4028e4a1ac63dc6d60821bf18e59a807e051fee0a38
&& rm "${GOLANG_TARBALL}" \ && rm "${GOLANG_TARBALL}" \
&& sudo ln -s /usr/local/go/bin/go /usr/local/bin && sudo ln -s /usr/local/go/bin/go /usr/local/bin
# Create Nix directory as root.
RUN mkdir /nix && chown 1001:1001 /nix
# Jenkins user needs a specific UID/GID to work # Jenkins user needs a specific UID/GID to work
RUN sudo groupadd -g 1001 jenkins \ RUN sudo groupadd -g 1001 jenkins \
&& sudo useradd --create-home -u 1001 -g 1001 jenkins && sudo useradd --create-home -u 1001 -g 1001 jenkins
USER jenkins USER jenkins
ENV HOME="/home/jenkins" ENV HOME="/home/jenkins"
# Nix for jenkins user to build status-go.
RUN curl -s https://nixos.org/releases/nix/nix-2.19.3/install | sh -s -- --no-daemon
LABEL maintainer="jakub@status.im" LABEL maintainer="jakub@status.im"
LABEL source="https://github.com/status-im/status-desktop" LABEL source="https://github.com/status-im/status-desktop"
LABEL description="Build image for the Status Desktop client written in Nim." LABEL description="Build image for the Status Desktop client written in Nim."

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Object to store public URLs for description. */ /* Object to store public URLs for description. */
urls = [:] urls = [:]

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()
@ -9,7 +9,7 @@ pipeline {
/* Necessary image with Ubuntu 20.04 for older Glibc. */ /* Necessary image with Ubuntu 20.04 for older Glibc. */
docker { docker {
label 'linux' label 'linux'
image 'statusteam/nim-status-client-build:1.3.0-qt5.15.2' image 'statusteam/nim-status-client-build:1.4.0-qt5.15.2'
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */ /* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse' args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
} }

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.11' library 'status-jenkins-lib@v1.8.13'
/* Options section can't access functions in objects. */ /* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild() def isPRBuild = utils.isPRBuild()