anaconda-graveyard / conda-concourse-ci

Conda-driven Concourse CI for package building
BSD 3-Clause "New" or "Revised" License
13 stars 29 forks source link

add optional stage_for_upload job #146

Closed jjhelmus closed 4 years ago

jjhelmus commented 4 years ago

Add an optional "stage_for_upload" jobs to pipelines which executes the task defined in the stage_for_upload_config section of the configuration with the artifact directory passes in via the ARTIFACT_DIR environment variable. This job is created when the --stage-for-upload option is specified on the command line.

Additionally, adds a --commit-msg command line option where a git commit message can be specified that is passed to the the upload job via the GIT_COMMIT_MSG environment variable.

jjhelmus commented 4 years ago

The upload job is controlled by the stage-for-upload-config entry in the configuration files.

As an example:

stage-for-upload-config:
  platform: linux
  image_resource:
    type: docker-image
    source:
      repository: conda/c3i-linux-64
      tag: latest
  run:
    path: sh
    args:
      - '-exc'
      - >
        echo "Staging packages on for upload" &&
        echo "${ARTIFACT_DIR}" &&
        echo "${GIT_COMMIT_MSG}"

The contents of a git repository can be forwarded to this job by specifying a stage-for-upload-repo and an optional stage-for-upload-branch. The stage-for-upload-config should include:

inputs:
  - name: stage-packages-scripts
jjhelmus commented 4 years ago

These options can be specified on the command line using, for example

c3i one-off jedi jedi-feedstock/ --stage-for-upload --commit-msg "jedi 0.17.0"