File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 - run : make build
1919 - run :
2020 name : Download github-release tool
21- command : curl -sL 'https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2' | tar xjf - --strip-components 3 -C /go/bin
21+ command : |
22+ curl -sL 'https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2' | \
23+ tar xjf - --strip-components 3 -C /go/bin
2224 - run : github-release upload --user carlpett --repo terraform-sops --tag $CIRCLE_TAG --name terraform-provider-sops_$CIRCLE_TAG-linux-amd64 --file terraform-provider-sops
25+ - run :
26+ name : Trigger Docker Hub automated build
27+ command : |
28+ curl -X POST -H "Content-Type: application/json" \
29+ --data "{\"source_type\": \"Tag\", \"source_name\": \"$CIRCLE_TAG\"}" \
30+ https://registry.hub.docker.com/u/carlpett/terraform-sops/trigger/$DOCKER_HUB_TRIGGER_TOKEN/
2331 - store_artifacts :
2432 path : terraform-provider-sops
2533
Original file line number Diff line number Diff line change 11FROM hashicorp/terraform:light
2- ENV SOPS_PLUGIN_VERSION=v0.0.1
2+ ARG SOPS_PLUGIN_VERSION
3+ ENV SOPS_PLUGIN_VERSION=${SOPS_PLUGIN_VERSION}
34RUN curl -sLo /bin/terraform-provider-sops_${SOPS_PLUGIN_VERSION} https://github.com/carlpett/terraform-sops/releases/download/${SOPS_PLUGIN_VERSION}/terraform-provider-sops_${SOPS_PLUGIN_VERSION}-linux-amd64 && \
45 chmod +x /bin/terraform-provider-sops_${SOPS_PLUGIN_VERSION}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -eufo pipefail
3+ if ! echo ${DOCKER_TAG} | grep -qE ' ^v[0-9\.]+' ; then
4+ # If the tag is not a version, use the version of the latest tag
5+ git fetch --tags --unshallow > /dev/null
6+ export DOCKER_TAG=$( git describe --tags --abbrev=0 --match=' v*' )
7+ echo " Using plugin version ${DOCKER_TAG} "
8+ fi
9+ docker build --build-arg " SOPS_PLUGIN_VERSION=${DOCKER_TAG} " -t " ${IMAGE_NAME} " .
You can’t perform that action at this time.
0 commit comments