Skip to content
Snippets Groups Projects
Commit 6a4f2d90 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Merge branch 'testing' into 'master'

Initial release

See merge request !1
parents 9f067bd8 34cfc749
No related branches found
No related tags found
1 merge request!1Initial release
Pipeline #2136676 passed
---
include: 'https://gitlab.cern.ch/linuxsupport/cronjobs/base/raw/master/gitlab-ci.yml'
build_centos7_release:
stage: build
tags:
- docker-image-build
script: "echo" # unused but this line is required by GitLab CI
variables:
CONTEXT_DIR: centos7_release
TO: $CI_REGISTRY_IMAGE/centos7_release:$CI_COMMIT_REF_NAME
deploy:
extends: .nomad
stage: deploy
script:
- for j in *.nomad; do echo -e "\n${j}:"; nomad job run <(envsubst < $j); done
only:
- tags
- master
deploy_dev:
extends: .nomad
stage: deploy
script:
- for j in *.nomad; do echo -e "\n${j}:"; nomad job run <(envsubst < $j); done
except:
- tags
- master
when: manual
job "${PREFIX}_centos7_release" {
datacenters = ["meyrin"]
type = "batch"
periodic {
cron = "${SCHEDULE}"
time_zone = "Europe/Zurich"
prohibit_overlap = true
}
task "${PREFIX}_centos7_release" {
driver = "docker"
config {
image = "https://gitlab-registry.cern.ch/linuxsupport/cronjobs/centos7_release/centos7_release:${CI_COMMIT_REF_NAME}"
force_pull = ${FORCE_PULL}
# allow mock to function inside the container
cap_add = [
"SYS_ADMIN"
]
logging {
config {
tag = "${PREFIX}_centos7_release"
}
}
# Some content we only need to access readonly, however volumes doesn't allow this
# Using 'mounts' to define readonly bind mounts
mounts = [
{
type = "bind"
target = "/mnt/data1/dist/centos"
source = "/mnt/data1/dist/centos"
readonly = true
bind_options {
propagation = "rshared"
}
},
{
type = "bind"
target = "/mnt/data1/dist/mirror/vault.centos.org"
source = "/mnt/data1/dist/mirror/vault.centos.org"
readonly = true
bind_options {
propagation = "rshared"
}
},
{
type = "bind"
target = "/mnt/data1/dist/centos-debuginfo"
source = "/mnt/data1/dist/centos-debuginfo"
readonly = true
bind_options {
propagation = "rshared"
}
}
]
volumes = [
"/etc/linuxci.credential:/etc/linuxci.credential",
"/etc/lxsoftauth.conf:/etc/lxsoftauth.conf",
"$DATA1_DIST_CERN:/mnt/data1/dist/cern",
"$DATA2:/mnt/data2",
]
}
# Accidentally running the CC7 release as root would be disastrous
# Let's make sure this cannot happen
user = "build"
env {
NOMAD_ADDR = "$NOMAD_ADDR"
ADMIN_EMAIL = "$ADMIN_EMAIL"
}
resources {
cpu = 3000 # Mhz
memory = 1024 # MB
network {
mbits = 10
}
}
}
}
FROM gitlab-registry.cern.ch/linuxsupport/cc7-base:latest
COPY linuxsupport7-stable.repo /etc/yum.repos.d/
RUN yum install -y ssmtp git rsync createrepo createrepo_c repoview rpm-sign rpm-build mock mash koji
RUN groupadd -g 501 build
RUN useradd -u 501 -g 501 -G mock -M -d /mnt/data2/home/build build
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf
COPY koji.conf /etc/koji.conf
WORKDIR /mnt/data2/home/build
ENTRYPOINT ["/mnt/data2/home/build/bin/bsauto"]
[koji]
server = https://kojihub.cern.ch/kojihub
weburl = https://koji.cern.ch
topurl = https://koji.cern.ch/kojifiles
authtype = kerberos
[kojitest]
server = https://kojitesthub.cern.ch/kojihub
weburl = https://kojitest.cern.ch
topurl = https://kojitest.cern.ch/kojifiles
authtype = kerberos
[linuxsupport7-stable]
name=linuxsupport [stable]
baseurl=http://linuxsoft.cern.ch/internal/repos/linuxsupport7-stable/x86_64/os
enabled=1
gpgcheck=False
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-koji file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kojiv2
priority=1
protect=1
root=postmaster
mailhub=cernmx.cern.ch
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
FromLineOverride=YES
SCHEDULE="0 8 * * *"
DATA1_DIST_CERN="/mnt/data2/testdata1/dist/cern"
DATA2="/mnt/data2/testdata2"
ADMIN_EMAIL="morrice@cern.ch"
SCHEDULE="0 8 * * *"
DATA1_DIST_CERN="/mnt/data1/dist/cern"
DATA2="/mnt/data2"
ADMIN_EMAIL="lxsoft-admins@cern.ch"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment