Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
reposync
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
linuxsupport
cronjobs
reposync
Commits
ea45e27e
Verified
Commit
ea45e27e
authored
2 years ago
by
Alex Iribarren
Browse files
Options
Downloads
Patches
Plain Diff
New build method
parent
a2688bd4
No related branches found
Branches containing commit
No related tags found
1 merge request
!216
New build method
Pipeline
#4214721
passed
2 years ago
Stage: prepare
Stage: build
Stage: deploy_test
Stage: deploy
Stage: cleanup
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+12
-6
12 additions, 6 deletions
.gitlab-ci.yml
reposync.nomad.tpl
+1
-2
1 addition, 2 deletions
reposync.nomad.tpl
with
13 additions
and
8 deletions
.gitlab-ci.yml
+
12
−
6
View file @
ea45e27e
...
...
@@ -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
This diff is collapsed.
Click to expand it.
reposync.nomad.tpl
+
1
−
2
View file @
ea45e27e
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment