-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile including whole monorepo (#10472)
- Loading branch information
1 parent
196ba83
commit 3fffa15
Showing
7 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Build celo-monorepo container | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'dockerfiles/all-monorepo/**' | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- 'dockerfiles/all-monorepo/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
celomonorepo-build-dev: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/monorepo:${{ github.sha }} | ||
if: | | ||
github.ref != 'refs/heads/master' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/monorepo | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/all-monorepo/Dockerfile | ||
|
||
celomonorepo-build: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/monorepo:${{ github.sha }} | ||
if: | | ||
github.ref == 'refs/heads/master' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo-master/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/monorepo | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/all-monorepo/Dockerfile |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: Build celo-monorepo container | ||
name: Build celotool container | ||
|
||
on: | ||
push: | ||
|
@@ -15,26 +15,26 @@ on: | |
jobs: | ||
celotool-build-dev: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/celotool:testing | ||
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/celotool:${{ github.sha }} | ||
if: | | ||
github.ref != 'refs/heads/master' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/celotool | ||
tag: testing | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/celotool/Dockerfile | ||
|
||
celotool-build: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool:latest | ||
name: Build us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool:${{ github.sha }} | ||
if: | | ||
github.ref == 'refs/heads/master' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-monorepo-master/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool | ||
tag: latest | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/celotool/Dockerfile |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM node:18 | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
WORKDIR /celo-monorepo | ||
|
||
# Needed for gsutil | ||
RUN apt-get update && \ | ||
apt-get install -y lsb-release && \ | ||
apt-get install -y curl build-essential git python3 && \ | ||
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \ | ||
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ | ||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \ | ||
apt-get update -y && \ | ||
apt-get install -y google-cloud-sdk kubectl netcat-openbsd && \ | ||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# ensure yarn.lock is evaluated by kaniko cache diff | ||
COPY . ./ | ||
|
||
RUN yarn install --network-timeout 100000 --frozen-lockfile && yarn cache clean | ||
RUN yarn build | ||
|
||
RUN rm -rf .git | ||
RUN rm -rf .gitmodules | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM node:18 | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
WORKDIR /celo-monorepo | ||
|
||
# Needed for gsutil | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
# | ||
# VERSION=x.y.z; docker build . --build-arg VERSION=$VERSION -t gcr.io/celo-testnet/celocli-standalone:$VERSION | ||
FROM node:12-alpine | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
# Install cli install dependencies. | ||
RUN apk add --no-cache python3 git make gcc g++ bash libusb-dev linux-headers eudev-dev | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ RUN npm install @celo/celocli | |
|
||
# Build the combined image | ||
FROM node:12-alpine as final_image | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
ARG network_name="alfajores" | ||
ARG network_id="44787" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ COPY packages/sdk/wallets/wallet-remote packages/sdk/wallets/wallet-remote | |
|
||
##### Main stage | ||
FROM node:18 | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
WORKDIR /celo-phone-number-privacy/ | ||
|
||
|