-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GoogleCloudPlatform:main' into gl7
- Loading branch information
Showing
608 changed files
with
7,250 additions
and
1,280 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,5 @@ | ||
FROM alpine/git | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash jq curl && \ | ||
rm -rf /var/cache/apk/* |
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,53 @@ | ||
# Stage 1: Building Go dependencies | ||
FROM golang:1.19-bullseye AS builder | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Download go.mod and go.sum from your repository | ||
ADD "https://raw.githubusercontent.com/GoogleCloudPlatform/magic-modules/main/tpgtools/go.mod" go.mod | ||
ADD "https://raw.githubusercontent.com/GoogleCloudPlatform/magic-modules/main/tpgtools/go.sum" go.sum | ||
|
||
# Install the go dependencies | ||
RUN go mod download | ||
|
||
# Stage 2: Creating the final imag | ||
FROM ruby:3.1-bullseye | ||
|
||
# golang | ||
COPY --from=golang:1.19-bullseye /usr/local/go /usr/local/go | ||
ENV GOPATH /go | ||
ENV PATH /usr/local/go/bin:$PATH | ||
ENV PATH $GOPATH/bin:$PATH | ||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" | ||
WORKDIR $GOPATH | ||
|
||
# terraform binary used by tfv/tgc | ||
COPY --from=hashicorp/terraform:1.4.2 /bin/terraform /bin/terraform | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV GO111MODULE "on" | ||
ENV LC_ALL=C.UTF-8 | ||
ENV LANG=C.UTF-8 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends git openssh-client apt-transport-https ca-certificates curl netbase wget gcc make jq libjq1 | ||
|
||
RUN git config --global user.name "Modular Magician" | ||
RUN git config --global user.email "[email protected]" | ||
|
||
# Set up Github SSH cloning. | ||
RUN ssh-keyscan github.com >> /known_hosts | ||
RUN echo "UserKnownHostsFile /known_hosts" >> /etc/ssh/ssh_config | ||
|
||
RUN go install golang.org/x/tools/cmd/goimports@d088b475e3360caabc032aaee1dc66351d4e729a | ||
RUN go install github.com/github/[email protected]+incompatible | ||
|
||
ADD "https://raw.githubusercontent.com/GoogleCloudPlatform/magic-modules/main/mmv1/Gemfile" Gemfile | ||
ADD "https://raw.githubusercontent.com/GoogleCloudPlatform/magic-modules/main/mmv1/Gemfile.lock" Gemfile.lock | ||
RUN bundle install | ||
RUN rm Gemfile Gemfile.lock | ||
|
||
# Copy Go dependencies from builder stage | ||
COPY --from=builder /go/pkg /go/pkg | ||
|
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
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
from golang:1.19-bullseye as resource | ||
SHELL ["/bin/bash", "-c"] | ||
# Set up Github SSH cloning. | ||
RUN ssh-keyscan github.com >> /known_hosts | ||
RUN echo "UserKnownHostsFile /known_hosts" >> /etc/ssh/ssh_config | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git jq unzip parallel curl && \ | ||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk 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 --keyring /usr/share/keyrings/cloud.google.gpg add - && \ | ||
apt-get update -y && \ | ||
apt-get install google-cloud-sdk -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget https://releases.hashicorp.com/terraform/1.2.5/terraform_1.2.5_linux_amd64.zip \ | ||
&& unzip terraform_1.2.5_linux_amd64.zip \ | ||
&& rm terraform_1.2.5_linux_amd64.zip \ | ||
&& mv ./terraform /bin/terraform | ||
|
||
### the following version of terraform are required for | ||
### terraform-validator-tester-integration | ||
RUN wget https://releases.hashicorp.com/terraform/0.13.7/terraform_0.13.7_linux_amd64.zip \ | ||
&& unzip terraform_0.13.7_linux_amd64.zip \ | ||
&& rm terraform_0.13.7_linux_amd64.zip \ | ||
&& mkdir /terraform \ | ||
&& mv terraform /terraform/0.13.7 | ||
|
||
RUN wget https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_linux_amd64.zip \ | ||
&& unzip terraform_0.12.31_linux_amd64.zip \ | ||
&& rm terraform_0.12.31_linux_amd64.zip \ | ||
&& mv terraform /terraform/0.12.31 |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
.ci/containers/terraform-validator-tester-integration/Dockerfile
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.