Skip to content

Getting Started

This guide walks through creating and running a minimal pipeline that copies Python files from one git repository to another.

1. Create the pipeline directory

mkdir -p pipelines/sync-python

2. Write the pipeline script

Create pipelines/sync-python/pipeline.pipe:

SOURCE git
  url     https://github.com/org/source-repo.git
  branch  main
  secret  src_token

TARGET git
  url     https://github.com/org/target-repo.git
  branch  release
  secret  dst_token

COPY  src/**/*.py  lib/
REPLACE  "__version__ = \"dev\""  "__version__ = \"1.0.0\""  lib/**/*.py

3. Add secrets

Create pipelines/sync-python/secrets.yaml:

secrets:
  src_token:
    type: https_token
    token: ghp_xxxxxxxxxxxxxxxxxxxx

  dst_token:
    type: https_token
    token: ghp_yyyyyyyyyyyyyyyyyy

Warning

Never commit secrets.yaml to version control. Add it to .gitignore.

4. Validate the pipeline

remanufacture pipeline validate sync-python

Expected output:

Pipeline 'sync-python' is valid.
  Source: git https://github.com/org/source-repo.git
  Target: git https://github.com/org/target-repo.git
  Operations: 2

5. Run the pipeline

remanufacture pipeline run sync-python

Expected output:

Run a1b2c3d4-... succeeded.

6. Inspect the run log

remanufacture pipeline logs sync-python

Next steps