Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawn docker ENOENT on image build #43

Open
knjk04 opened this issue Oct 16, 2023 · 3 comments
Open

spawn docker ENOENT on image build #43

knjk04 opened this issue Oct 16, 2023 · 3 comments
Labels
question Further information is requested

Comments

@knjk04
Copy link

knjk04 commented Oct 16, 2023

Hi @esatterwhite,

When I try to build my Docker image using this plugin in my CI/CD pipeline in GitLab, I get this error:

[semantic-release] › ✘  An error occurred while running semantic-release: Error: Command failed with ENOENT: docker build --network=default --quiet --tag ...

Here is the relevant part of the CI job log:
https://gist.github.com/knjk04/d8792489979a765fd0f76156b8f7f9ac

This was working fine before, so I'm not sure what's changed. I have this running inside a Docker image that in turn can use Docker (Docker in Docker).

Here is my .releaserc.json (my package.json only includes package dependencies and versions):

{
  "branches": [
    { "name": "main" },
    {
      "name": "semrel",
      "prerelease": true
    }
  ],
  "preset": "conventionalcommits",
  "plugins": [
    [
      "@semantic-release/commit-analyzer",
      {
          "preset": "conventionalcommits"
      }
    ],
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "./CHANGELOG.md"
      }
    ],
    "@semantic-release/gitlab",
    [
      "@semantic-release/git",
      {
        "assets": ["./CHANGELOG.md"]
      }
    ],
    [
      "@codedependant/semantic-release-docker",
      {
        "dockerTags": [
          "my_app_{{version}}"
        ],
        "dockerImage": "app",
        "dockerRegistry": "redacted.dkr.ecr.us-east-1.amazonaws.com"
      }
    ],
    [
      "@semantic-release/exec",
      {
        "publish": "python3 ./slack_alert_on_release.py ${nextRelease.version} app"
      }
    ]
  ]
}

I am using version 4.4.0

Do you have any thoughts on why I might be getting this error and what I can do to fix this?

Thanks in advance.

@esatterwhite
Copy link
Owner

It looks like docker isn't installed. ENOENT is entity not found. So either the binary is missing or one of the relative paths is pointing to a file that isn't there

@esatterwhite
Copy link
Owner

I see a reference to ../../builds that looks a little suspect. But I'm general, ENOENT is almost always file not found

@esatterwhite esatterwhite added the question Further information is requested label Oct 20, 2023
@esatterwhite
Copy link
Owner

You might try enabling debug logs too. It should just be an environment variable. DEBUG=semantic-release:*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants