This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| search(first: 1, type: ISSUE, query: "type:pr repo:REPO_NAME COMMIT_SHA") { | |
| nodes { | |
| ... on PullRequest { | |
| id | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -u | |
| access_token=$GITHUB_ACCESS_TOKEN | |
| subject_json=$(curl --url "https://api.github.com/graphql?access_token=$access_token" \ | |
| --header 'content-type: application/json' \ | |
| --data "{ \"query\": \"{ search(first: 1, type: ISSUE, query: \\\"type:pr repo:xlayers/xlayers $COMMIT_SHA\\\") { nodes { ... on PullRequest { id, number, title } } } }\" }") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| # Previous steps here... | |
| # Send the preview domain to the issue thread on GitHub | |
| - name: 'google/cloud-sdk:alpine' | |
| id: 'Push the Preview Link to GitHub' | |
| entrypoint: "/bin/bash" | |
| args: ['./scripts/github-create-comment.bash'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo -n "cb09******************" | \ | |
| gcloud kms encrypt \ | |
| --plaintext-file=- \ | |
| --ciphertext-file=- \ | |
| --location=global \ | |
| --keyring=GITHUB_ACCESS_TOKEN \ | |
| --key=GITHUB_ACCESS_TOKEN | \ | |
| base64 | |
| # Output: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gcloud kms keys add-iam-policy-binding \ | |
| GITHUB_ACCESS_TOKEN --location=global --keyring=GITHUB_ACCESS_TOKEN \ | |
| --member=serviceAccount:[email protected] \ | |
| --role=roles/cloudkms.cryptoKeyEncrypterDecrypter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: xlayers-_SHORT_SHA_ | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: xlayers-_SHORT_SHA_ | |
| template: | |
| metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: xlayers-_SHORT_SHA_ | |
| spec: | |
| ports: | |
| - port: 80 | |
| selector: | |
| app: xlayers-_SHORT_SHA_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: ingress-_SHORT_SHA_ | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| # make sure the controller redirects (301) to HTTPS | |
| ingress.kubernetes.io/ssl-redirect: "true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| charset utf-8; | |
| sendfile on; | |
| root /usr/share/nginx/html; | |
| location / { | |
| expires -1; | |
| add_header Pragma "no-cache"; | |
| add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nginx:latest | |
| COPY scripts/cloudbuild/ngcontainer/nginx.conf /etc/nginx/conf.d/default.conf | |
| COPY dist/html /usr/share/nginx/html |