2022-07-04 11:40:02 +00:00
|
|
|
#!/bin/bash -eu
|
|
|
|
#
|
2022-09-19 12:12:48 +00:00
|
|
|
# create vendor and webpack bundles inside a container (for reproducibility)
|
2022-07-04 11:40:02 +00:00
|
|
|
# using a Go cache:
|
2022-09-19 12:12:48 +00:00
|
|
|
# ./create_bundles_in_container.sh --security-opt label=disable -v $(pwd)/.gocache:/root/go
|
2022-07-04 11:40:02 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
cat <<EOF | podman build -t grafana-pcp-build -f - .
|
2022-10-25 14:56:15 +00:00
|
|
|
FROM fedora:36
|
2022-07-04 11:40:02 +00:00
|
|
|
|
|
|
|
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
|
2022-09-19 12:12:48 +00:00
|
|
|
COPY grafana-pcp.spec create_bundles.sh build_frontend.sh list_bundled_nodejs_packages.py *.patch .
|
2022-07-04 11:40:02 +00:00
|
|
|
RUN mkdir bundles
|
2022-09-19 12:12:48 +00:00
|
|
|
CMD ./create_bundles.sh && mv *.tar.* bundles
|
2022-07-04 11:40:02 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
podman run --name grafana-pcp-build --replace "$@" grafana-pcp-build
|
|
|
|
podman cp grafana-pcp-build:bundles/. .
|