Let’s say I have a Docker image which does some work as part of a workflow in which I do not need to run any commands because it is a specialized image created just for the task.
This is what I would like to do:
qa-notify-slack: docker: - image: privatedockerregistry.io/deployment_notify_slack:1.0 environment: TARGET_ENV: "qa"
But it fails with the following errors:
* in job 'qa-notify-slack': steps is not a list * Config file is invalid: at jobs: steps: steps is required
I had to add a fake step which you’ll not be happy about but I don’t want to run a command in my container:
qa-notify-slack: docker: - image: privatedockerregistry.io/deployment_notify_slack:1.0 environment: TARGET_ENV: "qa" steps: # fake step to make CircleCI linter happy - setup_remote_docker
In my opinion running a specialized Docker image which does some work during the CI/CD run but doesn’t do anything with the code is a valid use-case. Think about clearing caches, notifying tools like Slack, NewRelic or Sentry about the deployment or other custom commands.