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

Prow: Add shell check to openshift/installer #1131

Merged
merged 1 commit into from
Aug 8, 2018
Merged

Prow: Add shell check to openshift/installer #1131

merged 1 commit into from
Aug 8, 2018

Conversation

alejovicu
Copy link
Contributor

Add Shell check to openshift/installer. (CORS-746)

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 31, 2018
@alejovicu
Copy link
Contributor Author

/assign @bbguimaraes

- sh
args:
- -c
- 'for file in $(find ./ -type f -name "*.sh");
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine but generally you want to add this as a script in the repository so that developers can run it locally, too

Copy link
Contributor

Choose a reason for hiding this comment

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

@stevekuznetsov @alejovicu we can include shellcheck|terraform-lint|terraform-fmt|go unit tests as targets in a Makefile in the installer repo? then combine them all here with a single make cmd? (eventually, we're replacing the bazel build with Make, too, AFAIK. We can start with a simple Makefile for testing to replace the travis cmds, then add on in near future?

Copy link
Member

Choose a reason for hiding this comment

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

we can include shellcheck|terraform-lint|terraform-fmt|go unit tests as targets in a Makefile in the installer repo? then combine them all here with a single make cmd?

The only downside I see to using a single make call here would be granular retesting. All of these are fast, so I'm in favor of lumping them all into a single Prow test, but I wouldn't want something heavy (like e2e tests) lumped in with them ;).

Copy link
Member

Choose a reason for hiding this comment

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

Actually, another issue with lumping them together would be errors in one test masking issues in another. My preferred approach to that would be to use --keep-going, so a failure in one subtest (e.g. Terraform formatting) wouldn't mask errors in another (e.g. Go unit tests).

Copy link
Contributor

@sallyom sallyom Aug 1, 2018

Choose a reason for hiding this comment

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

@wking we had a long discussion on this :) I think @alejovicu @stevekuznetsov and I are all on the same page with this now.. we'll def want to have separate targets.. like 'make tflint, make cli_unit, etc' and we'll have a hack directory (following convention of other openshift/repos) where we'll keep the simple scripts, like 'tflint.sh', etc
EDIT: we'll simply call the small test scripts in prow directly, rather than introduce a Makefile for this, for now

@@ -3209,6 +3209,33 @@ presubmits:
- --template=/usr/local/e2e-aws
- --target=e2e-aws

- name: shell-check
trigger: "(?m)^/shell-check"
rerun_command: "/shell-check"
Copy link
Contributor

Choose a reason for hiding this comment

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

As in the other PR, convention is to use /test <name> and have context ci/prow/<name>

@stevekuznetsov
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 31, 2018
@alejovicu
Copy link
Contributor Author

alejovicu commented Aug 1, 2018

Please do not merge until this openshift/installer#104 is merged

@wking
Copy link
Member

wking commented Aug 3, 2018

Please do not merge until this openshift/installer#104 is merged

It landed this morning, so we should be good to go here.

@@ -3230,6 +3230,25 @@ presubmits:
args:
- ./hack/yaml-lint.sh

- name: shellcheck
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, final nit -- this is usually ci-pull-$org-$repo-$name

@stevekuznetsov
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2018
@openshift-merge-robot openshift-merge-robot merged commit 4ab826a into openshift:master Aug 8, 2018
@openshift-ci-robot
Copy link
Contributor

@alejovicu: Updated the config configmap using the following files:

  • key config.yaml using file cluster/ci/config/prow/config.yaml

In response to this:

Add Shell check to openshift/installer. (CORS-746)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@alejovicu alejovicu deleted the CORS-746 branch August 8, 2018 18:03
wking added a commit to wking/openshift-installer that referenced this pull request Aug 14, 2018
These have moved into Prow presubmit jobs:

* Terraform lint: openshift/release@82e00346 (Prow: Add Terraform Lint
  to openshift/installer, 2018-08-06, openshift/release#1124).
* YAML lint: openshift/release@457be2cd (Added prow yaml-lint job
  description for installer repo, 2018-08-02, openshift/release#1138).
* ShellCheck: openshift/release@e12a7a06 (Prow: Add shellcheck to
  openshift/installer, 2018-08-08, openshift/release#1131).
* Terraform format: openshift/release@f67e06e4 (openshift installer:
  add terraform fmt, 2018-08-04, openshift/release#1152).
* Go vet: openshift/release@71afdcca (Added go-vet prow job,
  2018-08-14, openshift/release#1181).
* Building the tarball: openshift/release@42a5a0d0 (add
  openshift/installer 'bazel build tarball' test to prow, 2018-08-13,
  openshift/release#1178).
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.

7 participants