diff options
| author | David Hovey <david@hoveytech.com> | 2019-09-25 17:30:43 -0700 |
|---|---|---|
| committer | David Hovey <david@hoveytech.com> | 2019-09-25 17:30:43 -0700 |
| commit | 73288861776fd8e1c7008fac42fee0e851f10eed (patch) | |
| tree | eb928a69bd1ab4a77fbc0321181a59e8fd3f9482 /icons | |
| parent | 72c7370548a65efcea9a9ba57c59cd10fa6e7530 (diff) | |
Created script for building Docker image used with visio stencils, updating usage of Docker related Docker image
Diffstat (limited to 'icons')
| -rw-r--r-- | icons/README.md | 2 | ||||
| -rw-r--r-- | icons/tools/build-visio-stencil-creator.sh | 24 | ||||
| -rwxr-xr-x | icons/tools/update-visio.sh | 22 |
3 files changed, 30 insertions, 18 deletions
diff --git a/icons/README.md b/icons/README.md index e6940947..582e52b5 100644 --- a/icons/README.md +++ b/icons/README.md @@ -26,6 +26,8 @@ This script will convert all svg into png. It's based on a docker container defi This script will convert png icons into Visio stencil using project from [here](https://github.com/hoveytechllc/visio-stencil-creator) +A Docker image hosted on GCR (`k8s.gcr.io/visio-stencil-creator`), is used to generate the Visio stencil file. The script [./tools/build-visio-stencil-creator.sh](./tools/build-visio-stencil-creator.sh) can be used to update the Docker image if it needs to be built. + ## How to use these icons Each icon can be found in differents formats diff --git a/icons/tools/build-visio-stencil-creator.sh b/icons/tools/build-visio-stencil-creator.sh new file mode 100644 index 00000000..f6d73080 --- /dev/null +++ b/icons/tools/build-visio-stencil-creator.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +GITHUB_ORG="hoveytechllc" +REPO_NAME="visio-stencil-creator" +TAG_NAME="v1.0" + +GCR_REPO="hoveytech/${REPO_NAME}:${TAG_NAME}" + +rm -fdr ./tools/${REPO_NAME} + +# Clone repository in current path +git clone --branch release/${TAG_NAME} https://github.com/${GITHUB_ORG}/${REPO_NAME}.git ./tools/${REPO_NAME} + +# build image using Dockerfile from github repository +# Tag resulting image for pushing to k8s.gcr.io +docker build \ + -t ${GCR_REPO} \ + -f ./tools/${REPO_NAME}/Dockerfile \ + ./tools/${REPO_NAME} + +# Clean up source code +rm -fdr ./tools/${REPO_NAME} + +docker push ${GCR_REPO}
\ No newline at end of file diff --git a/icons/tools/update-visio.sh b/icons/tools/update-visio.sh index c56da036..05b50c14 100755 --- a/icons/tools/update-visio.sh +++ b/icons/tools/update-visio.sh @@ -1,27 +1,13 @@ #!/bin/bash ICONS_PATH=${PWD} +DOCKER_IMAGE_REPO="k8s.gcr.io/visio-stencil-creator:v1.0" -GITHUB_ORG="hoveytechllc" -REPO_NAME="visio-stencil-creator" - -rm -fdr ./tools/${REPO_NAME} - -# Clone repository in current path -git clone https://github.com/${GITHUB_ORG}/${REPO_NAME}.git ./tools/${REPO_NAME} - -# build image using Dockerfile from github repository -docker build \ - -t ${REPO_NAME}:latest \ - -f ./tools/${REPO_NAME}/Dockerfile \ - ./tools/${REPO_NAME} - -# Run newly created Docker image +# Run docker image that generates Visio stencil +# using png images. docker run \ -v ${ICONS_PATH}:/app/content \ - ${REPO_NAME}:latest \ + ${DOCKER_IMAGE_REPO} \ "--image-pattern=**/labeled/*-256.png" \ "--image-path=/app/content/png" \ "--output-filename=/app/content/visio/kubernetes-visio-stencil.vssx" - -rm -fdr ./tools/${REPO_NAME}
\ No newline at end of file |
