diff --git a/images/Dockerfile.full b/images/Dockerfile.full index 0df644f..a5aaa74 100644 --- a/images/Dockerfile.full +++ b/images/Dockerfile.full @@ -7,7 +7,8 @@ ADD devstatscode.tar . ADD devstats-docker-images.tar . ADD grafana-bins.tar . RUN cp replacer patches/patch.sh /usr/bin/ -RUN patch.sh testsrv devstats-demo.net +RUN patch.sh testsrv devstats-demo.net 'cncf prometheus' +RUN patch.sh testsrv devstats.graphql.org 'graphql graphqljs graphiql expressgraphql graphqlspec' RUN make -f ./images/Makefile.full dockerinstall RUN make -f ./images/Makefile.full links FROM alpine diff --git a/images/Dockerfile.minimal b/images/Dockerfile.minimal index 4ade825..64f4595 100644 --- a/images/Dockerfile.minimal +++ b/images/Dockerfile.minimal @@ -7,7 +7,8 @@ ADD devstatscode.tar . ADD devstats-docker-images.tar . ADD grafana-bins.tar . RUN cp replacer patches/patch.sh /usr/bin/ -RUN patch.sh testsrv devstats-demo.net +RUN patch.sh testsrv devstats-demo.net 'cncf prometheus' +RUN patch.sh testsrv devstats.graphql.org 'graphql graphqljs graphiql expressgraphql graphqlspec' RUN make -f ./images/Makefile.minimal dockerinstall FROM alpine RUN apk add git bash diff --git a/patches/patch.sh b/patches/patch.sh index b30ed61..99c6ea4 100755 --- a/patches/patch.sh +++ b/patches/patch.sh @@ -9,6 +9,13 @@ then echo "$0: you need to specify hostname: devstats-demo.net, graphql.devstats.org etc." exit 2 fi +if [ -z "$3" ] +then + echo "$0: projects to patch not specified, assuming all" + projs="." +else + projs="$3" +fi if [ "$1" = "prodsrv" ] then fromh='devstats.cncf.io' @@ -19,7 +26,8 @@ else echo "$0: 1st arg must be either prodsrv or testsrv, got: $1" exit 3 fi -files=`find ./metrics/ -name vars.yaml -o -name sync_vars.yaml` || exit 4 +cd metrics || exit 4 +files=`find $projs -name vars.yaml -o -name sync_vars.yaml` || exit 5 for fn in $files do echo "Patching $fn"