Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #48 from ashish-amarnath/be-non-gcr-friendly
Browse files Browse the repository at this point in the history
Update publish-manager to be more non gcp friendly
  • Loading branch information
k8s-ci-robot authored Jul 2, 2019
2 parents 5c831e9 + 08ce05b commit 9bd5fef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Run: `./scripts/publish-manager.sh`

#### Using Docker

Alternatively, run: `docker build -t <MY_REPOSITORY>/capd-manager:latest .`
Alternatively, run: `REGISTRY=<MY_REGISTRY> ./scripts/publish-manager.sh`

## Trying CAPD

Expand Down
14 changes: 10 additions & 4 deletions scripts/publish-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

readonly GCP_PROJECT=$(gcloud config get-value project)

set -o errexit
set -o xtrace

REGISTRY=$(gcloud config get-value project)
TAG=${TAG:-dev}
readonly IMAGE_NAME="capd-manager"

readonly GCR_REGISTRY="gcr.io/${GCP_PROJECT}"
readonly TAG=${TAG:-dev}

readonly REGISTRY=${REGISTRY:-$GCR_REGISTRY}

IMAGE="gcr.io/${REGISTRY}/capd-manager:${TAG}"
readonly IMAGE=${REGISTRY}/${IMAGE_NAME}:${TAG}

docker build --file Dockerfile -t "${IMAGE}" .
gcloud docker -- push "${IMAGE}"
docker push "${IMAGE}"

0 comments on commit 9bd5fef

Please sign in to comment.