Hi,
im really struggling with using directories..
I dont know if I am stupid or I dont read enough docs.
export async function cdk8sDevRelease(props: cdk8sDevReleaseProps) {
const { application } = props
console.log(`Received application parameter: ${application}`)
return await dag.container()
.from("node:22")
.withMountedDirectory("/kubernetes", dag.directory().withNewDirectory(path.join(process.cwd(), "../kubernetes")))
.withWorkdir("kubernetes")
.withExec(["ls", "-lah"])
.sync()
}
this method is called via index.ts
@func()
async test(application: string) {
return await cdk8sDevRelease(
{
application: application,
}
)
}
the pipeline looks like the following:
steps:
- script: curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
displayName: 'Install Dagger CLI'
- script: |
export PATH=$HOME/.local/bin:$PATH
dagger version
displayName: 'Verify Dagger Installation'
- script: |
export PATH=$HOME/.local/bin:$PATH
cd dagger-pipelines
dagger call test --application ${{ parameters.application }}
displayName: 'Run Local Dagger Module'
I am really struggeling with mounting the ../kubernetes direcoty which is part of the project and contains cdk8s stuff.
My goal is to run npm runcommands.
Can someone help me please?
Thank you in advance!