Skip to content

Commit

Permalink
Rename the cloudbuild folder (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewroengoogle authored Jan 4, 2024
1 parent 7bdf338 commit a2e3793
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cloud_build/firebase-ghcli/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM gcr.io/gcp-runtimes/ubuntu_20_0_4

# Install github cli
RUN apt update && apt install -y \
curl \
gpg
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg;
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null;
RUN apt update && apt install -y gh;

# Install node and npm
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ENV NODE_MAJOR=20
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install nodejs -y

# Install firebase-tools
RUN npm install -g firebase-tools
18 changes: 18 additions & 0 deletions cloud_build/firebase-ghcli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Summary
This directory contains a Dockerfile that provides access to firebase tools and
the Github CLI. This image is used to deploy various Dart/Flutter websites to
firebase in both production and staging, and is also used to comment on Github
PRs.


## Installed tools
* Github CLI
* Node/NPM
* Firebase Tools


## Additional information
When the dockerfile or cloud build template in this directory is changed in a
PR, the cloud build template is triggered and a new version of the image is
deployed as the latest version in Container Registry under the `flutter-dev`
project in GCP.
6 changes: 6 additions & 0 deletions cloud_build/firebase-ghcli/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/firebase-gh-cli', 'cloud_build/firebase-ghcli']
images:
- 'gcr.io/$PROJECT_ID/firebase-ghcli'
tags: ['dash-firebase-ghcli']

0 comments on commit a2e3793

Please sign in to comment.