Last active
March 26, 2018 21:00
-
-
Save mike-carey/25edfdc9356c25bcb564956c9446c704 to your computer and use it in GitHub Desktop.
Shows a concourse example of keeping a mirror in sync with its original
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 | |
git_original_uri: # Fill in URI | |
git_original_branch: master # Change if need be | |
git_original_private_key: # Fill in SSH key | |
# Mirror | |
git_mirror_uri: # Fill in URI | |
git_mirror_branch: master # Change if need be | |
git_mirror_private_key: # Fill in SSH key |
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
resources: | |
- name: original | |
type: git | |
source: | |
uri: {{git_original_uri}} | |
branch: {{git_original_branch}} | |
private_key: {{git_original_private_key}} | |
- name: mirror | |
type: git | |
source: | |
uri: {{git_mirror_uri}} | |
branch: {{git_mirror_branch}} | |
private_key: {{git_mirror_private_key}} | |
- name: schedule | |
type: time | |
source: | |
interval: 10m | |
jobs: | |
- name: Synchronize mirror | |
plan: | |
- aggregate: | |
- get: schedule | |
trigger: true | |
- get: original | |
- put: mirror | |
params: | |
repository: original |
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
TARGET=lite # Fly target | |
PIPELINE=mirrors # Pipeline name | |
# Login | |
fly -t $TARGET login | |
# Set the pipeline | |
fly -t $TARGET set-pipeline -p $PIPELINE -c pipeline.yml -l params.yml | |
# Unpause the pipeline | |
fly -t $TARGET unpause-pipeline -p $PIPELINE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment