Skip to content

Commit dcd9a41

Browse files
committed
fix release
Signed-off-by: Bin Du <bindu@microsoft.com>
1 parent 0dc88b3 commit dcd9a41

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
images: [ubuntu:18.04, ubuntu:20.04, ubuntu:22.04, centos:7, centos:8, mcr.microsoft.com/cbl-mariner/base/core:2.0]
17+
images: [ubuntu_18.04, ubuntu_20.04, ubuntu_22.04, centos_7, centos_8, mcr.microsoft.com/cbl-mariner/base/core_2.0]
1818
platforms: [linux/amd64, linux/arm64]
1919
steps:
2020
- name: Set Release Version
@@ -43,15 +43,16 @@ jobs:
4343
RELEASE_VERSION=${RELEASE_VERSION#v}
4444
echo "RELEASE_VERSION=${RELEASE_VERSION}"
4545
46-
# parse OS from IMAGE
47-
OS=${IMAGE}
48-
if [[ "${IMAGE}" =~ "mcr.microsoft.com/cbl-mariner/base/core:" ]]; then
49-
OS="mariner:${IMAGE#mcr.microsoft.com/cbl-mariner/base/core:}"
46+
# parse BUILD_IMAGE and OS from IMAGE
47+
BUILD_IMAGE=${IMAGE/_/:}
48+
OS=${BUILD_IMAGE}
49+
if [[ "${BUILD_IMAGE}" =~ "mcr.microsoft.com/cbl-mariner/base/core:" ]]; then
50+
OS="mariner:${BUILD_IMAGE#mcr.microsoft.com/cbl-mariner/base/core:}"
5051
fi
51-
echo "BUILD_IMAGE=${IMAGE}"
52+
echo "BUILD_IMAGE=${BUILD_IMAGE}"
5253
echo "OS=${OS}"
5354
54-
docker buildx build --build-arg BUILD_IMAGE=${IMAGE} --build-arg OS=${OS} --build-arg RELEASE_VERSION=${RELEASE_VERSION} -f .github/workflows/release/Dockerfile --platform=${{ matrix.platforms }} -o releases/ .
55+
docker buildx build --build-arg BUILD_IMAGE=${BUILD_IMAGE} --build-arg OS=${OS} --build-arg RELEASE_VERSION=${RELEASE_VERSION} -f .github/workflows/release/Dockerfile --platform=${{ matrix.platforms }} -o releases/ .
5556
5657
# remove unused package
5758
if [[ "${OS}" =~ "ubuntu" ]]; then
@@ -108,4 +109,4 @@ jobs:
108109
repo_token: "${{ secrets.GITHUB_TOKEN }}"
109110
prerelease: false
110111
files: |
111-
releases/overlaybd-*.*
112+
releases/overlaybd-*.*

.github/workflows/release/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ ARG RELEASE_VERSION
2121
RUN ls -l /src && chmod 755 .github/workflows/release/build.sh && .github/workflows/release/build.sh ${OS} ${RELEASE_VERSION}
2222

2323
FROM scratch AS release
24-
COPY --from=builder /src/build/overlaybd-*.* /
24+
COPY --from=builder /src/build/overlaybd-*.* /

.github/workflows/release/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ elif [[ ${OS} =~ "mariner" ]]; then
5656
yum install -y libaio-devel libcurl-devel openssl-devel libnl3-devel e2fsprogs-devel glibc-devel libzstd-devel binutils ca-certificates-microsoft build-essential
5757
yum install -y rpm-build make git wget sudo tar gcc gcc-c++
5858

59-
DISTRO=${OS/:/}
60-
PACKAGE_RELEASE="-DPACKAGE_RELEASE=2${DISTRO}"
59+
DISTRO=${OS/:/.}
60+
PACKAGE_RELEASE="-DPACKAGE_RELEASE=1.${DISTRO}"
6161
fi
6262

6363
if [[ ${ARCH} == "x86_64" ]]; then
@@ -75,4 +75,4 @@ mkdir build
7575
cd build
7676
${CMAKE} .. -DPACKAGE_VERSION=${PACKAGE_VERSION} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_TESTING=0 -DENABLE_DSA=0 -DENABLE_ISAL=0 ${PACKAGE_RELEASE} ${COMPILER}
7777
make -j8
78-
${CPACK} --verbose
78+
${CPACK} --verbose

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,4 @@ Welcome to contribute! [CONTRIBUTING](CONTRIBUTING.md)
373373

374374
## Licenses
375375

376-
Overlaybd is released under the Apache License, Version 2.0.
376+
Overlaybd is released under the Apache License, Version 2.0.

0 commit comments

Comments
 (0)