Skip to content

Commit

Permalink
slack-15.0: fix private repo git config in docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed May 23, 2024
1 parent e9875f2 commit 2639380
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/base/Dockerfile.mariadb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ ARG BUILD_GIT_BRANCH
# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GH_ACCESS_TOKEN

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess

# Allow checkout of github.com/slackhq/vitess-addons (private repo)
ENV GOPRIVATE=github.com/slackhq/vitess-addons
RUN git config --global url.https://[email protected]/.insteadOf https://github.com/

# Build Vitess
RUN make build

Expand Down
7 changes: 7 additions & 0 deletions docker/base/Dockerfile.mariadb103
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ ARG BUILD_GIT_BRANCH
# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GH_ACCESS_TOKEN

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess

# Allow checkout of github.com/slackhq/vitess-addons (private repo)
ENV GOPRIVATE=github.com/slackhq/vitess-addons
RUN git config --global url.https://[email protected]/.insteadOf https://github.com/

# Build Vitess
RUN make build

Expand Down
7 changes: 7 additions & 0 deletions docker/base/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ ARG BUILD_GIT_BRANCH
# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GH_ACCESS_TOKEN

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess

# Allow checkout of github.com/slackhq/vitess-addons (private repo)
ENV GOPRIVATE=github.com/slackhq/vitess-addons
RUN git config --global url.https://[email protected]/.insteadOf https://github.com/

# Build Vitess
RUN make build

Expand Down
7 changes: 7 additions & 0 deletions docker/base/Dockerfile.percona57
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ ARG BUILD_GIT_BRANCH
# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GH_ACCESS_TOKEN

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess

# Allow checkout of github.com/slackhq/vitess-addons (private repo)
ENV GOPRIVATE=github.com/slackhq/vitess-addons
RUN git config --global url.https://[email protected]/.insteadOf https://github.com/

# Build Vitess
RUN make build

Expand Down
7 changes: 7 additions & 0 deletions docker/base/Dockerfile.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ ARG BUILD_GIT_BRANCH
# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GH_ACCESS_TOKEN

# Re-copy sources from working tree
USER root
COPY . /vt/src/vitess.io/vitess

# Allow checkout of github.com/slackhq/vitess-addons (private repo)
ENV GOPRIVATE=github.com/slackhq/vitess-addons
RUN git config --global url.https://[email protected]/.insteadOf https://github.com/

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess
Expand Down

0 comments on commit 2639380

Please sign in to comment.