diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-01 15:22:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-01 15:22:25 +0000 |
commit | 449e373567557490a87c86be8d4e4071bd200fea (patch) | |
tree | 03263c28cbff996b9dcf6376a2a94a14cf6c8ce8 /create_bundles_in_container.sh | |
parent | 55cfeb99ef546c2091f3d1ad38c996f5559e63c6 (diff) |
automatic import of grafana-pcpopeneuler24.03_LTS
Diffstat (limited to 'create_bundles_in_container.sh')
-rwxr-xr-x | create_bundles_in_container.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/create_bundles_in_container.sh b/create_bundles_in_container.sh new file mode 100755 index 0000000..2524525 --- /dev/null +++ b/create_bundles_in_container.sh @@ -0,0 +1,21 @@ +#!/bin/bash -eu +# +# create vendor and webpack bundles inside a container (for reproducibility) +# using a Go cache: +# ./create_bundles_in_container.sh --security-opt label=disable -v $(pwd)/.gocache:/root/go +# + +cat <<EOF | podman build -t grafana-pcp-build -f - . +FROM fedora:36 + +RUN dnf upgrade -y && \ + dnf install -y rpmdevtools python3-packaging make golang nodejs yarnpkg golang-github-jsonnet-bundler golang-github-google-jsonnet + +WORKDIR /tmp/grafana-pcp-build +COPY grafana-pcp.spec create_bundles.sh build_frontend.sh list_bundled_nodejs_packages.py *.patch . +RUN mkdir bundles +CMD ./create_bundles.sh && mv *.tar.* bundles +EOF + +podman run --name grafana-pcp-build --replace "$@" grafana-pcp-build +podman cp grafana-pcp-build:bundles/. . |