File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,6 @@ func main() {
9494 Usage : "set cache-control header for uploaded objects" ,
9595 EnvVar : "PLUGIN_CACHE_CONTROL" ,
9696 },
97- cli.BoolTFlag {
98- Name : "yaml-verified" ,
99- Usage : "Ensure the yaml was signed" ,
100- EnvVar : "DRONE_YAML_VERIFIED" ,
101- },
10297 cli.StringFlag {
10398 Name : "env-file" ,
10499 Usage : "source env file" ,
@@ -130,7 +125,6 @@ func run(c *cli.Context) error {
130125 CacheControl : c .String ("cache-control" ),
131126 PathStyle : c .Bool ("path-style" ),
132127 DryRun : c .Bool ("dry-run" ),
133- YamlVerified : c .BoolT ("yaml-verified" ),
134128 }
135129
136130 return plugin .Exec ()
Original file line number Diff line number Diff line change 66 "path/filepath"
77 "strings"
88
9- "errors"
109 log "github.com/Sirupsen/logrus"
1110 "github.com/aws/aws-sdk-go/aws"
1211 "github.com/aws/aws-sdk-go/aws/credentials"
@@ -66,8 +65,6 @@ type Plugin struct {
6665 // Strip the prefix from the target path
6766 StripPrefix string
6867
69- YamlVerified bool
70-
7168 // Exclude files matching this pattern.
7269 Exclude []string
7370
@@ -94,12 +91,12 @@ func (p *Plugin) Exec() error {
9491 S3ForcePathStyle : aws .Bool (p .PathStyle ),
9592 }
9693
97- //Allowing to use the instance role or provide a key and secret
9894 if p .Key != "" && p .Secret != "" {
9995 conf .Credentials = credentials .NewStaticCredentials (p .Key , p .Secret , "" )
100- } else if p . YamlVerified != true {
101- return errors . New ( "Security issue: When using instance role you must have the yaml verified " )
96+ } else {
97+ log . Warn ( "AWS Key and/or Secret not provided (falling back to ec2 instance profile) " )
10298 }
99+
103100 client := s3 .New (session .New (), conf )
104101
105102 // find the bucket
You can’t perform that action at this time.
0 commit comments