pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/devatherock/git-sync

mous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-71a44d5be3f782c5.css" /> GitHub - devatherock/git-sync: CI plugin to sync the contents of a git repository with another
Skip to content

CI plugin to sync the contents of a git repository with another

License

Notifications You must be signed in to change notification settings

devatherock/git-sync

Repository files navigation

CircleCI Version Coverage Status Codacy Badge Docker Pulls Docker Image Size License: MIT

git-sync

CI plugin to sync the contents of a git repository with another

Usage

Docker

docker run --rm \
  -e PLUGIN_DEBUG=true \
  -e PLUGIN_START_COMMIT=29186cd \
  -e PLUGIN_TARGET_BRANCH=test \
  -v path/to/repo:/repo \
  -w=/repo \
  devatherock/git-sync:2.0.0

CI

Config

The following parameters/secrets can be set to configure the plugin.

Parameters

  • target_repo - Git URI of target repository. If not specified, same as the source repo
  • target_branch - Branch to sync to, in target repository. Optional, defaults to master
  • start_commit - Commit sha of the first commit to sync. All commits after that will be synced. If not specified, commit sha of the penultimate tag will be used. And if no tags are present, all commits up to the 100th will be synced
  • debug - Flag to enable debug logs. Optional, by default, debug logs are disabled

Secrets

The following secret values can be set to configure the plugin.

  • GIT_SYNC_TOKEN - Github API token with push access to the repository. Required if HTTP URI of target repository is used

drone.io

git-sync:
  when:
    ref: refs/tags/v*
    event: tag
  image: devatherock/git-sync:2.0.0
  target_branch: prod
  secrets: [ git_sync_token ]

vela

steps:
  - name: git-sync
    ruleset:
      tag: refs/tags/v*
      event: tag
    image: devatherock/git-sync:2.0.0
    secrets: [ git_sync_token ]
    parameters:
      target_branch: prod

CircleCI

To add SSH key with write access to target repository, follow these instructions

version: 2
jobs:
  sync:
    docker:
      - image: devatherock/git-sync:2.0.0
    working_directory: ~/my-source-repo
    environment:
      PLUGIN_TARGET_REPO: "git@bitbucket.org:xyz/my-target-repo.git"                        # Git URI of target repository. If not specified, same as the source repo
      PLUGIN_TARGET_BRANCH: master                                                          # Branch to sync to in target repository. Optional, defaults to master
      PLUGIN_START_COMMIT: 29186cd                                                          # Commit sha of the first commit to sync. All commits after that will be synced. If not specified, commit sha of the penultimate tag will be used. And if no tags are present, all commits up to the 100th will be synced
      PLUGIN_DEBUG: false                                                                   # Flag to enable debug logs. Optional, by default, debug logs are disabled
      GIT_SYNC_TOKEN: xyz                                                                   # Github API token with push access to the repository. Required if HTTP URI of target repository is used
    steps:
      - checkout
      - add_ssh_keys:
          fingerprints:
            - "ssh key fingerprint"                                                         # Fingerprint of SSH key with write access to target repository
      - run: sh /scripts/entry-point.sh

Tests

To test the latest plugin image, run the below command

sh functional-tests.sh

About

CI plugin to sync the contents of a git repository with another

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy