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
76051936
Commit
76051936
authored
6 years ago
by
Alex Iribarren
Browse files
Options
Downloads
Patches
Plain Diff
Fix force_pull options and simplify CI
parent
d8bd5d1c
No related branches found
No related tags found
1 merge request
!2
Better dev workflow
Pipeline
#522870
failed
6 years ago
Stage: prepare
Stage: build
Stage: deploy_test
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+4
-52
4 additions, 52 deletions
.gitlab-ci.yml
reposync.nomad
+2
-1
2 additions, 1 deletion
reposync.nomad
reposync_oneshot.nomad
+2
-1
2 additions, 1 deletion
reposync_oneshot.nomad
reposync_scheduler.nomad
+2
-1
2 additions, 1 deletion
reposync_scheduler.nomad
with
10 additions
and
55 deletions
.gitlab-ci.yml
+
4
−
52
View file @
76051936
...
...
@@ -35,9 +35,7 @@ build_reposync:
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
reposync
TO
:
$CI_REGISTRY_IMAGE/do_reposync:latest
# latest is the image used in production
only
:
-
master
TO
:
$CI_REGISTRY_IMAGE/do_reposync:$CI_COMMIT_REF_NAME
build_scheduler
:
stage
:
build
...
...
@@ -46,53 +44,7 @@ build_scheduler:
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
scheduler
TO
:
$CI_REGISTRY_IMAGE/reposync_scheduler:latest
# latest is the image used in production
only
:
-
master
build_reposync_branch
:
stage
:
build
tags
:
-
docker-image-build
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
reposync
TO
:
$CI_REGISTRY_IMAGE/do_reposync:$CI_BUILD_REF_NAME
# put name of branch in image
except
:
-
master
build_scheduler_branch
:
stage
:
build
tags
:
-
docker-image-build
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
scheduler
TO
:
$CI_REGISTRY_IMAGE/reposync_scheduler:$CI_BUILD_REF_NAME
# put name of branch in image
except
:
-
master
tag_reposync
:
stage
:
tag
tags
:
-
docker-image-build
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
reposync
TO
:
$CI_REGISTRY_IMAGE/do_reposync:$CI_COMMIT_TAG
only
:
-
tags
tag_scheduler
:
stage
:
tag
tags
:
-
docker-image-build
script
:
"
echo"
# unused but this line is required by GitLab CI
variables
:
CONTEXT_DIR
:
scheduler
TO
:
$CI_REGISTRY_IMAGE/reposync_scheduler:$CI_COMMIT_TAG
only
:
-
tags
TO
:
$CI_REGISTRY_IMAGE/reposync_scheduler:$CI_COMMIT_REF_NAME
.nomad_deps_template
:
&nomad_deps
...
...
@@ -100,9 +52,9 @@ tag_scheduler:
curl https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o /tmp/nomad.zip &&
unzip /tmp/vault.zip -d /usr/local/bin/ &&
unzip /tmp/nomad.zip -d /usr/local/bin/ &&
export IMAGE_VER="${CI_COMMIT_TAG:-latest}" &&
vault read nomad/creds/submitjobs -format=json > token.json &&
export `jq -r '"NOMAD_TOKEN=" + .data.secret_id' token.json`
export `jq -r '"NOMAD_TOKEN=" + .data.secret_id' token.json` &&
if [ -z ${CI_COMMIT_TAG+x} ]; then export FORCE_PULL="true"; else export FORCE_PULL="false"; fi
deploy_test
:
stage
:
deploy_test
...
...
This diff is collapsed.
Click to expand it.
reposync.nomad
+
2
−
1
View file @
76051936
...
...
@@ -12,7 +12,8 @@ job "${JOB_PREFIX}reposync" {
driver
=
"docker"
config
{
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/do_reposync:${IMAGE_VER}"
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/do_reposync:${CI_COMMIT_REF_NAME}"
force_pull
=
"${FORCE_PULL}"
logging
{
type
=
"gelf"
config
{
...
...
This diff is collapsed.
Click to expand it.
reposync_oneshot.nomad
+
2
−
1
View file @
76051936
...
...
@@ -11,7 +11,8 @@ job "${JOB_PREFIX}reposync_oneshot" {
driver
=
"docker"
config
{
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/reposync_scheduler:${IMAGE_VER}"
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/reposync_scheduler:${CI_COMMIT_REF_NAME}"
force_pull
=
"${FORCE_PULL}"
logging
{
type
=
"gelf"
config
{
...
...
This diff is collapsed.
Click to expand it.
reposync_scheduler.nomad
+
2
−
1
View file @
76051936
...
...
@@ -14,7 +14,8 @@ job "${JOB_PREFIX}reposync_scheduler" {
driver
=
"docker"
config
{
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/reposync_scheduler:${IMAGE_VER}"
image
=
"https://gitlab-registry.cern.ch/linuxsupport/containers/reposync_test/reposync_scheduler:${CI_COMMIT_REF_NAME}"
force_pull
=
"${FORCE_PULL}"
logging
{
type
=
"gelf"
config
{
...
...
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