diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-05 03:03:36 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-05 03:03:36 +0000 |
commit | c8e89464d8257611add40edc33a5db8559a7dfa1 (patch) | |
tree | a3d7b81758422f7878998528cf5f60b9a5f927d4 /create_bundles_in_container.sh | |
parent | 28c53806df586a2e3949c7b4a6828e5c026157c0 (diff) |
automatic import of grafanaopeneuler24.03_LTS
Diffstat (limited to 'create_bundles_in_container.sh')
-rwxr-xr-x | create_bundles_in_container.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/create_bundles_in_container.sh b/create_bundles_in_container.sh new file mode 100755 index 0000000..4640068 --- /dev/null +++ b/create_bundles_in_container.sh @@ -0,0 +1,24 @@ +#!/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-build -f - . +FROM fedora:36 + +RUN dnf upgrade -y && \ + dnf install -y rpmdevtools python3-packaging python3-pyyaml make golang nodejs yarnpkg + +# https://groups.google.com/g/golang-nuts/c/MVtHZUtZru4 +ENV GOPROXY=https://proxy.golang.org,direct + +WORKDIR /tmp/grafana-build +COPY grafana.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-build --replace "$@" grafana-build +podman cp grafana-build:bundles/. . |