diff --git a/slc9-builder/alice-system-deps.repo b/slc9-builder/alice-system-deps.repo new file mode 100644 index 0000000..de29edd --- /dev/null +++ b/slc9-builder/alice-system-deps.repo @@ -0,0 +1,5 @@ +[alice-system-deps] +name=ALICE System Dependencies - EL9 +baseurl=https://s3.cern.ch/swift/v1/alibuild-repo/RPMS/o2-full-deps_el9.x86-64/ +enabled=1 +gpgcheck=0 diff --git a/slc9-builder/packer.json b/slc9-builder/packer.json new file mode 100644 index 0000000..26302cf --- /dev/null +++ b/slc9-builder/packer.json @@ -0,0 +1,39 @@ +{ + "_comment": "Alma 9 builder", + "variables": { + "REPO": "registry.cern.ch/alisw/slc9-builder", + "TAG": "latest" + }, + "builders": [ + { + "type": "docker", + "image": "gitlab-registry.cern.ch/linuxsupport/alma9-base", + "commit": true, + "changes": [ + "ENTRYPOINT [\"\"]", + "CMD [\"/bin/bash\"]" + ] + } + ], + "provisioners": [ + { + "type": "file", + "source": "alice-system-deps.repo", + "destination": "/etc/yum.repos.d/alice-system-deps.repo" + }, + { + "type": "shell", + "script": "provision.sh" + } + ], + "post-processors": [ + [ + { + "type": "docker-tag", + "repository": "{{user `REPO`}}", + "tag": "{{user `TAG`}}" + }, + "docker-push" + ] + ] +} diff --git a/slc9-builder/provision.sh b/slc9-builder/provision.sh new file mode 100644 index 0000000..e2522b6 --- /dev/null +++ b/slc9-builder/provision.sh @@ -0,0 +1,23 @@ +#!/bin/sh -ex + +useradd -rmUu 980 mesosalien +useradd -rmUu 981 mesosci +useradd -rmUu 982 mesosdaq +useradd -rmUu 983 mesosuser +useradd -rmUu 984 mesostest + +wipednf () { + rpmdb --rebuilddb + dnf clean all + rm -rf /var/cache/yum +} + +wipednf + +dnf install -y epel-release dnf-plugins-core +dnf update -y +dnf groups install -y 'Development Tools' +# python3-{pip,setuptools} and s3cmd needed for Jenkins builds. +dnf install -y alice-o2-full-deps python3-pip python3-setuptools s3cmd + +wipednf