Skip to content

Instantly share code, notes, and snippets.

View omegaes's full-sized avatar

Abdul Rahman Babil omegaes

View GitHub Profile
@omegaes
omegaes / cloudbuild.yaml
Last active April 4, 2021 04:37
Demo-app-cloudbuild.yaml
#Demo-app-cloudbuild.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'asia.gcr.io/PROJECT_ID/gke-demo-app:$SHORT_SHA', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'asia.gcr.io/PROJECT_ID/gke-demo-app:$SHORT_SHA']
- name: 'omegaes/kubci'
@omegaes
omegaes / cloudbuild.yaml
Created April 4, 2021 04:39
Environment-Demo-cloudbuild.yaml
#Environment-Demo-cloudbuild.yaml
steps:
- name: 'gcr.io/cloud-builders/kubectl'
args: ['apply', '-k', './production/']
env:
- 'CLOUDSDK_COMPUTE_ZONE=asia-southeast1-a'
- 'CLOUDSDK_CONTAINER_CLUSTER=gke-cicd'
@omegaes
omegaes / commands.sh
Last active April 4, 2021 04:55
Create cloud build triggers and secrets
#!/bin/bash
# optain personal access token from Github to use for https clone
#https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
printf "https://GIT_USERNAME:GITHUB_PERSONAL_TOKEN@github.com/GIT_ORGANAIZATION/ENVIRONMENT_REPO_NAME.git" | gcloud secrets create ENV_REPO_AUTH_URL --data-file=-
# For more details about cloud build and it's configration,
# please refer to https://cloud.google.com/build/docs/concepts
# if you use Github or BitBucket, you need to connect GCP project with your account