hashicorp / hashicorp/nomad-pack

External pack dependency expects pack in deps subdirectory

Open
#255 3 comments 5 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
447
Forks
65
PR merge metrics
No merged PRs in 30d

Description

Following the https://github.com/hashicorp/nomad-pack/blob/main/docs/writing-packs.md guide, I was trying to load a `helper` template from a pack that's defined as a dependency.

**metadata.hcl**
```
app {
url = "https://git.tcassaert.com/homelab"
author = "tcassaert"
}

pack {
name = "backup_job"
description = "A Nomad Pack for Homelab backup jobs"
url = "https://git.tcassaert.com/tcassaert/nomad-packs/backup_job"
version = "0.0.1"
}

dependency "helpers" {
source = "ssh://git@git.tcassaert.com:2222/tcassaert/nomad-packs/packs/helpers"
}
```

When I try to render my pack, I'm getting the following, even without trying to use anything from the dependency yet:
```
! Failed To Process Pack

Error: failed to load pack dependency: failed to load dependent pack: stat /home/tcassaert/private/gitea/nomad-packs/packs/backup_job/deps/helpers: no such
file or directory
Type: *errors.errorString
Context:
- Registry Name: <>
- Pack Name: backup_job
- Pack Ref: <>
- Pack Path: /home/tcassaert/private/gitea/nomad-packs/packs/backup_job
```

When I do add the dependency in the `deps` subdirectory, it doesn't seem to find the `helper` template that I try to use, but maybe that's for another issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.