Branch: refs/heads/master
Home: https://github.com/jenkinsci/ec2-plugin
Commit: 5b470a0a19326ad6088309a386dce655a62080ea
https://github.com/jenkinsci/ec2-plugin/commit/5b470a0a19326ad6088309a386dce655a62080ea
Author: Brian Ewins <[email protected]>
Date: 2021-05-22 (Sat, 22 May 2021)
Changed paths:
M src/main/java/hudson/plugins/ec2/SlaveTemplate.java
M src/test/java/hudson/plugins/ec2/SlaveTemplateUnitTest.java
Log Message:
-----------
Raise an exception when AMI search is blank.
We use the configuration-as-code plugin; when interpolating secrets, if
you have a typo in the secret name, it inserts the empty string:
https://github.com/jenkinsci/configuration-as-code-plugin/blob/e7501727c4704aaa1e95bdc246a1454dc5b20440/plugin/src/main/java/io/jenkins/plugins/casc/SecretSourceResolver.java#L124
Unfortunately we had a typo in the name of an AMI used by a rarely-run job,
which used a slightly different AMI from all the other jobs on our server.
So, when we deployed, we missed the warning message:
Configuration import: Found unresolved variable
'/plugins/amazonEC2/special-ami'. Will default to empty string
... then a day later, the job that used this special ami ran. Because the
code warned rather than throwing an exeption, it attempted to search for an
AMI with no search parameters, then picked one of the results to launch.
As luck would have it, there was also a typo in our IAM rule that prevented
launching public AMIs; eventually, after two days of retries, the job managed
to launch one of the random AMIs: a bitcoin miner :facepalm:. The node
was shut down seconds later when jenkins failed to connect to it, and our
alarms noticed the miner, leading us to investigate where it had originated.
Hence this PR...I really don't think anyone wants to use Jenkins as a random
AMI launcher :)
Commit: 2b4dc77b4e4945db04e57941038861606d178416
https://github.com/jenkinsci/ec2-plugin/commit/2b4dc77b4e4945db04e57941038861606d178416
Author: Raihaan Shouhell <[email protected]>
Date: 2021-06-02 (Wed, 02 Jun 2021)
Changed paths:
M src/main/java/hudson/plugins/ec2/SlaveTemplate.java
M src/test/java/hudson/plugins/ec2/SlaveTemplateUnitTest.java
Log Message:
-----------
Merge pull request #617 from bazzargh/be/blank_ami_search
Raise an exception when AMI search is blank.
Compare:
https://github.com/jenkinsci/ec2-plugin/compare/6c053fb41246...2b4dc77b4e49
--
You received this message because you are subscribed to the Google Groups
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/ec2-plugin/push/refs/heads/master/6c053f-2b4dc7%40github.com.