Skip to content

Commit

Permalink
chore: update dockerfile and bump kpm pkg version (#1384)
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-hm19 authored Jan 16, 2025
1 parent d17c05b commit f9275bb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install npm packages and build UI
working-directory: ./ui
run: |
npm install
# Using 'CI=false' prevents build errors due to warnings.
# It bypasses the 'process.env.CI = true' setting in CI environments
# that treats warnings as errors, ensuring a successful build.
CI=false npm run build
touch build/.gitkeep
# Get version information
- name: Get version
id: get_version
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ COPY --from=portal-builder /src/ui/build /src/ui/build
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build SKIP_BUILD_PORTAL=true make build-local-linux

FROM ubuntu:22.04 AS base
FROM --platform=linux/amd64 ubuntu:22.04 AS base
# Install KCL Dependencies
RUN apt-get update -y && apt-get install python3 python3-pip -y
RUN apt-get update -y && apt-get install python3 python3-pip git -y
# KCL PATH
ENV PATH="/root/go/bin:${PATH}"
# KUSION
Expand All @@ -26,5 +26,4 @@ RUN /usr/local/bin/kusion

FROM base
COPY --from=build /src/_build/bundles/kusion-linux/bin/kusion /usr/local/bin/kusion
COPY --from=build /src/ui/build /usr/local/bin/ui/build
RUN /usr/local/bin/kusion
RUN /usr/local/bin/kusion
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ require (
k8s.io/utils v0.0.0-20240821151609-f90d01438635
kcl-lang.io/kcl-go v0.10.0-alpha.3
kcl-lang.io/kcl-plugin v0.5.0
kcl-lang.io/kpm v0.9.5
kcl-lang.io/kpm v0.9.9
kusionstack.io/kube-api v0.3.1
kusionstack.io/kusion-api-go v0.13.0
kusionstack.io/kusion-module-framework v0.2.3-beta.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1829,8 +1829,8 @@ kcl-lang.io/kcl-go v0.10.0-alpha.3 h1:01grUuyy/XfBZDRoMqUesU6OdzVPk0WF9WDOvuY70Z
kcl-lang.io/kcl-go v0.10.0-alpha.3/go.mod h1:kfHDBqsLNT+9T6VorS/EVbriZzix1rjIq0w6WCJ7GbA=
kcl-lang.io/kcl-plugin v0.5.0 h1:eoh6y4l81rwA8yhJXU4hN7YmJeTUNB1nfYCP9OffSxc=
kcl-lang.io/kcl-plugin v0.5.0/go.mod h1:QnZ5OLcyBw5nOnHpChRHtvBq8wvjwiHu/ZZ8j1dfz48=
kcl-lang.io/kpm v0.9.5 h1:BvSVj1U2mqWJIpciCK7Wg1mV1hhkeE5xPqcBaOxURh4=
kcl-lang.io/kpm v0.9.5/go.mod h1:4HTbPhB4DVtkamnIv5lrRcHtCVwzp4Pf/b+d3TN4nzs=
kcl-lang.io/kpm v0.9.9 h1:87A+Mp9pKtdLz6qtngdmDjkpTg9I4MIGJ93rtzjRTlk=
kcl-lang.io/kpm v0.9.9/go.mod h1:4HTbPhB4DVtkamnIv5lrRcHtCVwzp4Pf/b+d3TN4nzs=
kcl-lang.io/lib v0.10.0-alpha.3 h1:tZ7du+9/wv5ZHyPmPxljZQ33DdTYw++d9joH0LMC3q8=
kcl-lang.io/lib v0.10.0-alpha.3/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
kusionstack.io/kube-api v0.3.1 h1:MqU41B0i2cofm2M5KQIkuTsWQ81p0Ueq93zbdUaOuCM=
Expand Down

0 comments on commit f9275bb

Please sign in to comment.