Skip to content

Commit

Permalink
Adding Git binary to core rp image
Browse files Browse the repository at this point in the history
  • Loading branch information
kachawla committed May 17, 2023
1 parent 3d585ee commit 01f594d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ jobs:
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Build Git binary
run: |
make build-git
- name: Push container images (latest)
run: |
make docker-test-image-build && make docker-test-image-push
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
:hourglass: Building Radius and pushing container images for functional tests...
- name: Build and Push container images
run: |
make build && make docker-build && make docker-push
make build && make build-git && make docker-build && make docker-push
env:
DOCKER_REGISTRY: ${{ env.CACHE_REGISTRY }}
DOCKER_TAG_VERSION: ${{ env.REL_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
ARROW := \033[34;1m=>\033[0m

# order matters for these
include build/help.mk build/version.mk build/build.mk build/util.mk build/generate.mk build/test.mk build/controller.mk build/docker.mk build/recipes.mk build/install.mk build/debug.mk
include build/help.mk build/version.mk build/build.mk build/util.mk build/generate.mk build/test.mk build/controller.mk build/git.mk build/docker.mk build/recipes.mk build/install.mk build/debug.mk
34 changes: 34 additions & 0 deletions build/git.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ------------------------------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------------------------------

GIT_BINARY_URL?=https://github.com/git/git/archive/refs/tags/v2.40.1.tar.gz

# Downloads and builds Git binary
.PHONY: build-git
build-git:
@echo "$(ARROW) Downloading Git dependency - gettext"
wget https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.1.tar.gz -O gettext.tar.gz
tar xzf gettext.tar.gz
rm -f gettext.tar.gz
cd gettext-0.21.1
make configure && \
./configure --prefix=/usr && \
make && make install

@echo "$(ARROW) Downloading Git binary"
wget $(GIT_BINARY_URL) -O git.tar.gz
tar xzf git.tar.gz
rm -f git.tar.gz
mkdir -p /tmp/gitbinary
@echo "$(ARROW) Building Git binary"
cd git-2.40.1 && \
make configure && \
./configure --prefix=/tmp/gitbinary && \
make all doc info && \
sudo make install install-doc install-html install-info
mkdir -p $(OUT_DIR)/gitbinary
cp /tmp/gitbinary/bin/git $(OUT_DIR)/gitbinary/
chmod +x $(OUT_DIR)/gitbinary/git
sudo rm -rf /tmp/gitbinary
1 change: 1 addition & 0 deletions deploy/images/appcore-rp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG TARGETARCH
WORKDIR /

COPY ./linux_${TARGETARCH:-amd64}/release/appcore-rp /
COPY ./gitbinary/git /usr/local/bin/

USER 65532:65532

Expand Down

0 comments on commit 01f594d

Please sign in to comment.