-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now that we have a prod build in S3, we can fully switch over to it. Most of the changes are straightforward. One note of interest: the "pruning" stage is now really just about pruning the local cache. For now, we're not pruning from the bucket at all, pending a more defined policy & mechanism.
- Loading branch information
Showing
2 changed files
with
3 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,33 +40,4 @@ def path_exists(path) { | |
return shwrap_rc("test -e ${path}") == 0 | ||
} | ||
|
||
def rsync(from, to) { | ||
|
||
def rsync_keypath = "/var/run/secrets/kubernetes.io/duffy-key/duffy.key" | ||
if (!path_exists(rsync_keypath)) { | ||
echo "No ${rsync_keypath} file with rsync key." | ||
echo "Must be operating in dev environment" | ||
echo "Skipping rsync...." | ||
return | ||
} | ||
|
||
shwrap(""" | ||
# so we don't echo password to the jenkins logs | ||
set +x | ||
RSYNC_PASSWORD=\$(cat ${rsync_keypath}) | ||
export RSYNC_PASSWORD=\${RSYNC_PASSWORD:0:13} | ||
set -x | ||
# always add trailing slash for consistent semantics | ||
rsync -ah --stats --delete ${from}/ ${to} | ||
""") | ||
} | ||
|
||
def rsync_in(from, to) { | ||
rsync("[email protected]::fedora-coreos/prod/${from}", "${to}") | ||
} | ||
|
||
def rsync_out(from, to) { | ||
rsync("${from}", "[email protected]::fedora-coreos/prod/${to}") | ||
} | ||
|
||
return this |