Compare commits

...

4 Commits

Author SHA1 Message Date
Shubham Agrawal 69d5e73564 Fix pipeline yaml with auto tag suffix 2021-01-30 00:09:22 +05:30
Shubham Agrawal b33681a9b9 Merge pull request #9 from drone/improve_err
Log error if dockerfile does not exist at provided path
2021-01-29 14:41:19 +05:30
Shubham Agrawal cdd1510210 Log error if dockerfile does not exist at provided path 2021-01-29 14:39:06 +05:30
Shubham Agrawal fa7726153d Merge pull request #8 from drone/ecr_iam
Make access key & secret optional in case of iam role usage on EKS cluster
2021-01-20 00:28:57 +05:30
2 changed files with 19 additions and 0 deletions
+15
View File
@@ -14,30 +14,45 @@ steps:
settings:
repo: plugins/kaniko
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/docker/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
- tag
- name: gcr
image: plugins/docker
settings:
repo: plugins/kaniko-gcr
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/gcr/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
- tag
- name: ecr
image: plugins/docker
settings:
repo: plugins/kaniko-ecr
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/ecr/Dockerfile.linux.amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
- tag
+4
View File
@@ -31,6 +31,10 @@ func (p Plugin) Exec() error {
return fmt.Errorf("repository name to publish image must be specified")
}
if _, err := os.Stat(p.Build.Dockerfile); os.IsNotExist(err) {
return fmt.Errorf("dockerfile does not exist at path: %s", p.Build.Dockerfile)
}
cmdArgs := []string{
fmt.Sprintf("--dockerfile=%s", p.Build.Dockerfile),
fmt.Sprintf("--context=dir://%s", p.Build.Context),