Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do backups asynchronously #220

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

cgwalters
Copy link
Member

This takes us to a single point of truth for data; the other is
clearly secondary.

@miabbott
Copy link
Member

miabbott commented Aug 9, 2018

Since this is run on a timer, do we run the risk of backing up the results of a partially finished rdgo or cloud pipeline? Or phrased differently, do we care if we back up a partially finished pipeline?

@cgwalters
Copy link
Member Author

Or phrased differently, do we care if we back up a partially finished pipeline?

Yeah, we could add exclusions but...eh, doesn't seem worth it. At least for rdgo though we need to teach it to make datestamped-dirs that will sync more naturally.

string(credentialsId: params.ARTIFACT_SERVER, variable: 'ARTIFACT_SERVER'),
sshUserPrivateKey(credentialsId: params.ARTIFACT_SSH_CREDS_ID, keyFileVariable: 'KEY_FILE'),
]) {
sh "mkdir -p ${target}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about keeping this under $WORKSPACE and use the rsync_dir_in_dest() from #211? I really like the move away from /srv.

for (dir in dirs_to_backup) {
// Expand, but also avoid iteration+closure trap
def target = "/srv/rhcos/output/${dir}";
par_stages["backup-" + target] = { -> stage("Backup " + target) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use (the equivalent of) $(basename $target) for the stage name?

@jlebon
Copy link
Member

jlebon commented Aug 9, 2018

It might be as simple as wrapping the "Sync in" here and the "Sync out" in the cloud/rdgo jobs with lock(): https://jenkins.io/blog/2016/10/16/stage-lock-milestone/#lock. I can take a look into that after this merges.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 9, 2018
This takes us to a single point of truth for data; the other is
clearly secondary.
@cgwalters
Copy link
Member Author

Updated, but not tested (jenkins lost all nodes).

@jlebon
Copy link
Member

jlebon commented Aug 10, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2018
@jlebon
Copy link
Member

jlebon commented Aug 10, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit 997cc73 into openshift:master Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants