Melange continues building the package even though it throws a 'no such file or directory' error during package generation
Opened this issue · 0 comments
Dentrax commented
Tested on 0.14.10
.
Repro here:
- Use the following Melange manifest,
promitor.yaml
:
package:
name: promitor
version: 2.11.2
epoch: 0
description: Bringing Azure Monitor metrics where you need them.
copyright:
- license: MIT
dependencies:
runtime:
- dotnet-8
environment:
contents:
packages:
- busybox
- dotnet-8-sdk
- openssf-compiler-options
pipeline:
- uses: git-checkout
with:
repository: https://github.com/tomkerkhove/promitor
tag: Scraper-v${{package.version}}
expected-commit: a457a98b6e2920ea2751f4d07d0d8e085946eeec
- working-directory: src
pipeline:
- name: "Build Promitor Scraper"
runs: |
# Set runtime arch
if [[ "${{build.arch}}" == "aarch64" ]]; then
runtime_arch="arm64"
elif [[ "${{build.arch}}" == "x86_64" ]]; then
runtime_arch="x64"
fi
dotnet publish \
Promitor.Agents.Scraper/Promitor.Agents.Scraper.csproj \
--configuration release \
--output app \
--runtime linux-$runtime_arch \
--no-self-contained \
/p:Version=${{package.version}} \
-p:DebugSymbols=false \
-p:DebugType=none
mkdir -p "${{targets.contextdir}}"/usr/lib
cp -dr app "${{targets.contextdir}}"/usr/lib/promitor
mkdir -p "${{targets.contextdir}}"/usr/bin
ln -s /usr/lib/promitor/promitor "${{targets.contextdir}}"/usr/bin/promitor
- uses: strip
- Run
make package/promitor
- See the
Failed to open usr/bin/promitor: open usr/bin/promitor: no such file or directory
log - Expect the build succeeded and exited with zero