Skip to content

Commit

Permalink
slack-15.0: refactor private go dep config from #367
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed May 28, 2024
1 parent 1aed880 commit 6581bf5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 20 deletions.
5 changes: 5 additions & 0 deletions build.env
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ ln -sf "$PWD/misc/git/pre-commit" .git/hooks/pre-commit
ln -sf "$PWD/misc/git/commit-msg" .git/hooks/commit-msg
git config core.hooksPath .git/hooks
export EXTRA_BIN=$PWD/test/bin

# support private github.com/slackhq/vitess-addons repo
if [[ -n "${GH_ACCESS_TOKEN}" ]]; then
git config --global url.https://${GH_ACCESS_TOKEN}@github.com/.insteadOf https://github.com/
fi
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.mariadb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GOPRIVATE
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
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.mariadb103
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GOPRIVATE
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
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GOPRIVATE
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
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.percona57
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GOPRIVATE
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
5 changes: 1 addition & 4 deletions docker/base/Dockerfile.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ ARG BUILD_GIT_BRANCH
ARG BUILD_GIT_REV

# Allows private repo go dependencies
ARG GOPRIVATE
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 6581bf5

Please sign in to comment.