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

Merge m0dular/ca_extend into support_tasks #39

Merged
merged 2 commits into from
May 9, 2019

Conversation

m0dular
Copy link
Contributor

@m0dular m0dular commented Apr 16, 2019

No description provided.

@jarretlavallee
Copy link
Contributor

There are some linting issues that travis caught.

plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 2
plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 6
plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 11
plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 20
plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 23
plans/kb0337a_extend_ca_cert.pp - WARNING: variable not enclosed in {} on line 31
plans/kb0337b_upload_ca_cert.pp - WARNING: double quoted string containing no variables on line 41
plans/kb0337b_upload_ca_cert.pp - WARNING: double quoted string containing no variables on line 47
plans/kb0337b_upload_ca_cert.pp - WARNING: double quoted string containing no variables on line 56
plans/kb0337b_upload_ca_cert.pp - WARNING: double quoted string containing no variables on line 62
plans/kb0337b_upload_ca_cert.pp - WARNING: double quoted string containing no variables on line 68
source "$PT__installdir/support_tasks/files/common.sh"
^-- SC1090: Can't follow non-constant source. Use a directive to specify location.
        ^-- SC2154: PT__installdir is referenced but not assigned.
In tasks/kb0337e_extend_ca_cert.sh line 8:
contents="$(base64 -w 0 $new_cert)" || fail "encode_cert"
                        ^-- SC2086: Double quote to prevent globbing and word splitting.

@m0dular
Copy link
Contributor Author

m0dular commented Apr 17, 2019

Can't believe I was caught not quoting a variable. The shame!

Everything is an easy fix, but I don't think we can avoid the warning about source as that's set by Bolt at runtime.

tasks/kb0337e_extend_ca_cert.sh Outdated Show resolved Hide resolved
@suckatrash
Copy link
Contributor

@m0dular One thing that would be nice to have is a task to validate and check certificate expiration. I came up with a task that does this and you should feel free to drop it in if it seems ok. I can also submit a separate PR if that's easier.

https://github.com/suckatrash/control-repo/blob/production/site/test/tasks/check_cert_expiry.sh
https://github.com/suckatrash/control-repo/blob/production/site/test/tasks/check_cert_expiry.json

@m0dular
Copy link
Contributor Author

m0dular commented Apr 18, 2019

@suckatrash Great idea, thanks. I'll take your script and adapt it to work with my files/common.sh. There's BOLT-1158 to make something like this a standard Bolt library in the future.

@jarretlavallee
Copy link
Contributor

@m0dular Did you get a chance to fix the shellcheck errors?

@m0dular
Copy link
Contributor Author

m0dular commented Apr 22, 2019

@jarretlavallee Sorry, not yet. I was working on the tasks to check the expiration date of the CA cert and agent certs. I think I'm finished with that, so I'll add that, squash these commits, and make sure the linting is clean.

@m0dular
Copy link
Contributor Author

m0dular commented May 3, 2019

@suckatrash Created these tasks based on your suggestion and included them in this PR.

Also fix unnecessary dependency in configure_master.json
@jarretlavallee jarretlavallee merged commit 3d7904f into master May 9, 2019
@MartyEwings MartyEwings deleted the aph/SUP-1026-ca-extend branch May 7, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants