Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .prow.sh script #3

Merged
merged 1 commit into from
May 7, 2018
Merged

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented May 7, 2018

This works in tandem with the changes in
openshift/release#841.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 7, 2018
.prow.sh Outdated

yum -y install jq
for jsonfile in *.json; do
jq < $jsonfile >/dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, might be a dumb question, but do you mind elaborating a bit what does this line do?(Does it just check the validity of each json files). I was also confused about the usage of jq < $file vs jq $file, do you have pointers to look at for usage of < in bash? Thanks, =)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! It'll check that the JSON files are valid. Just a simple check that can be used for now until we have more sophisticated PR tests. < means feeding the file as the program's standard input: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html

jlebon added a commit to jlebon/release that referenced this pull request May 7, 2018
Let's keep it simple here so that we can more easily keep our CI scripts
self-contained within the repo, a-la-PAPR/Travis CI.

See also openshift/os#3.
This works in tandem with the changes in
openshift/release#841.
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 7, 2018
yum -y install jq
for jsonfile in *.json; do
echo "Checking JSON syntax for $jsonfile"
jq < $jsonfile . >/dev/null
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The . here is needed to work around a bug where jq will refuse to work if redirecting output to something that's not a TTY: jqlang/jq#1351.

Copy link
Member

@ashcrow ashcrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashcrow
Copy link
Member

ashcrow commented May 7, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2018
@openshift-merge-robot openshift-merge-robot merged commit a7a1d78 into openshift:master May 7, 2018
ashcrow pushed a commit to openshift/release that referenced this pull request May 7, 2018
Let's keep it simple here so that we can more easily keep our CI scripts
self-contained within the repo, a-la-PAPR/Travis CI.

See also openshift/os#3.
@jlebon jlebon deleted the pr/prow-sh branch May 24, 2018 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants