Issue with `put step` tutorial
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 57
- Forks
- 165
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
Describe the bug
As I was going through the tutorial, I discovered a bug or more like an unnecessary key which could confuse new-learners.
In lit/docs/getting-started/resources.lit There is a tutorial config that teaches about put step
resources:
- name: repo
type: git
source:
uri: git@github.com:concourse/examples.git
branch: master
private_key: |
-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
jobs:
- name: hello-world-job
plan:
- get: repo
trigger: true
- task: create-commit
config:
platform: linux
image_resource:
type: registry-image
source:
repository: gitea/gitea
inputs:
- name: repo
outputs:
- name: repo
params:
EMAIL: person@example.com
GIT_AUTHOR_NAME: Person Doe
run:
path: sh
args:
- -cx
- |
cd repo
date +%Y-%m-%d > todays-date
git add ./todays-date
git config --global user.email $EMAIL
git config --global user.name $GIT_AUTHOR_NAME
git commit -m "Update todays date"
- put: repo
params:
repository: repo
the get step has trigger set true which is why this pipeline would normally trigger and run indefinitely but because it is trying to add something that it has already done in the first run, it fails with nothing to commit, working tree clean in the second run.
I don't think trigger is required here.
Reproduction steps
- Create a concourse pipeline definition with above code
- Set the pipeline
- Trigger the pipeline.
...
Expected behavior
trigger removed or set to false
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open lit/docs/getting-started/resources.lit around line 570 and review the tutorial configuration, especially the get and put steps. Reproduce the pipeline behavior described in the issue, then remove or disable the get step's trigger and verify that the tutorial no longer causes the pipeline to rerun and fail with nothing to commit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell, yaml
- Domain
- ci-cd, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100