Readme.md is WIP (living document)
Grab the concourse tutorial
mkdir docker-concourse
cd docker-concourse
wget https://concourse-ci.org/docker-compose.yml
docker-compose up -d # remove -d to see logs
open http://127.0.0.1:8080
cd -
mkdir fly-cli-client
cd fly-cli-client
wget https://github.com/concourse/concourse/releases/download/v3.13.0/fly_darwin_amd64
mv fly_darwin_amd64 fly
sudo chmod +x fly
install fly /usr/local/bin
fly -t tutorial login --concourse-url http://127.0.0.1:8080
fly -t tutorial sync
fly -t tutorial set-pipeline -c examples/init/pipeline.yml -p hello-world
fly -t tutorial unpause-pipeline -p hello-world
cd docker-concourse; docker-compose down; cd -
Setup for the first time
docker build . #build the docker file
docker image ls # get the docker sha
docker run -i -t <DOCKER-IMAGE-ID> /bin/ash # run interactive
docker build -t my-resource-type:v1 .
docker ps -a # get the docker container id
docker commit -m "first commit" -a "your-username" <DOCKER-CONTAINER-ID> your-username/my-resource-type
docker push your-username/my-resource-type
docker tag <DOCKER-IMAGE-ID> your-username/my-resource-type:v1
docker push your-username/my-resource-type:v1
docker build .
then test your changes
docker image ls # get the docker sha
docker run -i -t <DOCKER-IMAGE-ID> /bin/ash # run interactive for alpine (instead of bash for other linux)
Type exit
to exit docker interactive (-i -t
).
Run in interactive mode docker run -i -t <DOCKER-IMAGE-ID> /bin/ash
then from that terminal you can test inputs printf "{\"only\":\"a-test\"}"|./check
fly -t tutorial intercept --check hello-world/my-pipeline
/api/v1/teams/main/pipelines/[PIPELINE-NAME]/resources/[RESOURCE-NAME]/check/webhook?webhook_token=[RANDOM-TOKEN]
The pipeline.yml
resources:
- name: git-website-develop
type: git
webhook_token: [RANDOM-TOKEN]
source:
uri: [email protected]:USER/REPO
branch: develop
private_key: ((github-private-key))
resource_types:
...
- name: my-resource-type
type: docker-image
source:
repository: your-username/my-resource-type
...
resources:
...
- name: my-resource-instance
type: my-resource-type
webhook_token: [RANDOM-TOKEN]
...