Bmeme OCI Image to build and push container on GCP platform
3.1K
OCI image, based on the official Docker image and integrated with Google Cloud SDK and Kaniko Executor, currently being used in Bmeme for Continuous Integration and Delivery.
authenticate that wraps authentication tasks against Google Cloud and Google Artifact Registry| Variable Name | Description |
|---|---|
GCP_SERVICE_ACCOUNT | The json key of the Google Service Account granted |
GCP_REGISTRY_HOST | Your Google Cloud Artifact Registry host |
Set mandatory enviroments, then:
# /usr/bin/authenticate
.gitlab-ci.yml pipelineimage: bmeme/gcp-image-builder:latest
stages:
- build
- package
variables:
GCP_PROJECT_ID: my-gcp-project
GCP_REGISTRY_HOST: europe-docker.pkg.dev #for example
before_script:
- /usr/bin/authenticate
build:
stage: build
script:
- docker compose up -d
package:
stage: package
script:
- |
kaniko/executor \
--dockerfile=/path/to/my/Dockerfile \
--destination=${GCP_REGISTRY_HOST}/${GCP_PROJECT_ID}/my-repo-name/my-image:1.0.0 \
--destination=${GCP_REGISTRY_HOST}/${GCP_PROJECT_ID}/my-repo-name/my-image:latest \
--cache=true \
--cache-repo=${GCP_REGISTRY_HOST}/${GCP_PROJECT_ID}/my-repo-name/my-image/cache
Content type
Image
Digest
sha256:a556b70e4…
Size
502.3 MB
Last updated
11 months ago
docker pull bmeme/gcp-image-builder