Blame SOURCES/create_bundles_in_container.sh

2e7f84
#!/bin/bash -eu
2e7f84
#
625261
# create vendor and webpack bundles inside a container (for reproducibility)
625261
# using a Go cache:
625261
#   ./create_bundles_in_container.sh --security-opt label=disable -v $(pwd)/.gocache:/root/go
2e7f84
#
2e7f84
2e7f84
cat <
2e7f84
FROM fedora:35
2e7f84
2e7f84
RUN dnf upgrade -y && \
625261
    dnf install -y rpmdevtools python3-packaging python3-pyyaml make golang nodejs yarnpkg
625261
625261
# https://groups.google.com/g/golang-nuts/c/MVtHZUtZru4
625261
ENV GOPROXY=https://proxy.golang.org,direct
2e7f84
2e7f84
WORKDIR /tmp/grafana-build
625261
COPY grafana.spec create_bundles.sh build_frontend.sh list_bundled_nodejs_packages.py *.patch .
2e7f84
RUN mkdir bundles
625261
CMD ./create_bundles.sh && mv *.tar.* bundles
2e7f84
EOF
2e7f84
2e7f84
podman run --name grafana-build --replace "$@" grafana-build
2e7f84
podman cp grafana-build:bundles/. .