atomist-skills / docker-build-skill

Atomist Skill to build and push Docker images
Apache License 2.0
1 stars 0 forks source link

Skill fails when no Dockerfile is present #16

Open slimslenderslacks opened 4 years ago

slimslenderslacks commented 4 years ago

configuration is "all repos" and everything else default

name: docker-build-skill
version: 1.1.3-38
upgrade_policy: latest_compatible_release
namespace: atomist
configurations:
- name: Docker Build
  enabled: true
  parameters:
  - name: repos
    value: {}
  resourceProviders:
  - name: docker_push_registry
    selectedResourceProviders:
    - id: AEIB5886C_c534d873-3053-4e66-85d0-4d3697ad60cc

On repos, that do not contain a Dockerfile, the skill fails and the mapped channel gets a message:

Screenshot 2020-05-15 17 36 02

Example repo is: https://github.com/slimslender/nextjs-blog

I expect the skill to run for this but I think it should not fail.

slimslenderslacks commented 4 years ago

Recently manually upgraded this skill to 1.1.3-38

cdupuis commented 4 years ago

There's currently no way for us to do this because we can't use the kaniko debug image to test if a file exists before running the build. We are hitting https://github.com/containerd/containerd/issues/4182. Once this is resolved and available in our GKE cluster, we can revisit this issue.

Ideally, the skill wouldn't even start when the file doesn't exist in the repository. Much like what we previously had with push tests.

For now the work-around is to disable the repo with the repo filter.

cdupuis commented 4 years ago

For now, I've changed the skill to not send a chat message and don't set a GitHub check if the Dockerfile specified doesn't exist. The skill itself will be still be marked as failed in the skill logs.

slimslenderslacks commented 4 years ago

I'll also create a corresponding requirement on Dockerfile "push rules" because I think this is pretty good justification for prioritizing that work.

slimslenderslacks commented 4 years ago

have upgraded to 1.1.3-45 and can confirm that slack messages are no longer being sent.