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

New build method

parent a2688bd4
No related branches found
No related tags found
1 merge request!216New build method
Pipeline #4214721 passed
......@@ -23,18 +23,24 @@ generate_jobs:
expire_in: 1 day
build_reposync:
stage: build
tags:
- docker-image-build
script: "echo" # unused but this line is required by GitLab CI
extends: .build_image
variables:
CONTEXT_DIR: reposync
TO: $CI_REGISTRY_IMAGE/reposync:$CI_COMMIT_REF_NAME
DOCKER_FILE: reposync/Dockerfile
TO: $CI_REGISTRY_IMAGE/reposync
PARENT_PIPELINE_ID: ${CI_PIPELINE_ID}
ARTIFACT_JOB: prepare_dirs
stop_deleted:
extends: .nomad
stage: cleanup
script:
- set +e
- nomad job status | grep running | cut -d' ' -f1 | grep "^${PREFIX}_reposync_[^\/]\+$" | sort > oldjobs
- set -e
- ls *.nomad | sed 's/\.nomad//' | sort > newjobs
- for JOB in `diff --new-line-format="" --unchanged-line-format="" oldjobs newjobs`; do echo -e "\nDeleting job ${JOB}:"; nomad job stop -verbose ${JOB} || true; done
- |
for JOB in $(diff --new-line-format="" --unchanged-line-format="" oldjobs newjobs); do
echo -e "\nDeleting job ${JOB}:"
nomad job stop -verbose ${JOB} || true
done
......@@ -33,8 +33,7 @@ job "${PREFIX}_reposync_${REPOID}" {
}
config {
image = "https://gitlab-registry.cern.ch/linuxsupport/cronjobs/reposync/reposync:${CI_COMMIT_REF_NAME}"
force_pull = ${FORCE_PULL}
image = "https://gitlab-registry.cern.ch/linuxsupport/cronjobs/reposync/reposync:${CI_COMMIT_SHORT_SHA}"
logging {
config {
tag = "${PREFIX}_reposync"
......
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