In Concourse, Resources refer to external resource types such as s3
, github
etc.
So for example, we can run a pipeline which pulls data from github, such as cloning a repository, so in other words the data that was cloned from the github repository is within the container where your tasks will be executed.
Concourse Github Resourse Example
In this tutorial we will use the github resource type, in conjunction with a task that will execute a script, where the script will be inside the github repository.
Our pipeline as pipeline.yml
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
You can head over to hello-world task on github to see the task, but all it does is running a uname -a
So our job has a task that will call the action defined in our task_hello_world.yml
which retrieves it from the get
step, as you can see it’s the concourse-tutorial
resource, which is defined under the resources section as a git resource type.
Set the pipeline:
1 2 3 4 |
|
Unpause the pipeline:
1 2 |
|
Trigger the job (trigger is off; default)
1 2 3 4 5 6 7 |
|
So this job cloned the github repository, called the task file which calls the bash script from th github repository to run uname -a
For my other content on concourse, have a look at the concourse category.
Thank You
Please feel free to show support by, sharing this post, making a donation, subscribing or reach out to me if you want me to demo and write up on any specific tech topic.