Itβs not clear to me from the documentation , even if you can transfer one task to another task (not from task to task, but from work to work).
I donβt know if I am doing the right thing conceptually, maybe it should be modeled differently in Concourse, but I'm trying to ensure that the pipeline for the Java project is divided into several granular tasks, which can be executed in parallel and run independently if I need to restart some task.
As I see the pipeline:
- First job:
- pulls code from github repo
- creates a project using maven
- deploys artifacts to the maven repository (
mvn deploy ) - updating
SNAPSHOT versions of sub-modules of the Maven project - copies artifacts (jar files) to the output directory (
output task )
- Second job:
- selects
jar from output - builds docker containers for all of them (in parallel)
- Pipeline continues
I was not able to pass the output from task 1 to task 2. In addition, I am wondering if any changes that I made to the source resource of the git repository will be present in the next task (from task 1 to task 2).
So the questions are:
- How can I transfer the state of an assembly from a job to a job (I know that jobs can be scheduled on different nodes and specifically in different containers)?
- Do I need to save state in a resource (say, S3 / git)?
- Is Concourse design-free (in this context)?
- Where is the best place to get more information? I tried the manual, it's just not that detailed.
What I have found so far:
output not passed from job to job- Any changes to the resource (
put in the github repo) are selected in the next task, but the changes in the working copy are not
A minimal example (it does not work if the commented lines are not commented out with an error: missing inputs: gist-upd, gist-out ):
--- resources: - name: gist type: git source: uri: " git@bitbucket.org :snippets/foo/bar.git" branch: master private_key: {{private_git_key}} jobs: - name: update plan: - get: gist trigger: true - task: update-gist config: platform: linux image_resource: type: docker-image source: {repository: concourse/bosh-cli} inputs: - name: gist outputs: - name: gist-upd - name: gist-out run: path: sh args: - -exc - | git config --global user.email " nobody@concourse.ci " git config --global user.name "Concourse" git clone gist gist-upd cd gist-upd echo `date` > test git commit -am "upd" cd ../gist echo "foo" > test cd ../gist-out echo "out" > test - put: gist params: {repository: gist-upd} - name: fetch-updated plan: - get: gist passed: [update] trigger: true - task: check-gist config: platform: linux image_resource: type: docker-image source: {repository: alpine} inputs: - name: gist
source share