Skip to content

Commit a9fafaa

Browse files
committed
Merge branch 'add_commit_env' into 'master'
Add commit env See merge request rac-docker-dev/oracle-database-operator!256
2 parents 759402a + abf244d commit a9fafaa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager
2626

2727
# Use oraclelinux:8-slim as base image to package the manager binary
2828
FROM oraclelinux:8-slim
29+
ARG CI_COMMIT_SHA CI_COMMIT_BRANCH
30+
ENV COMMIT_SHA=${CI_COMMIT_SHA} \
31+
COMMIT_BRANCH=${CI_COMMIT_BRANCH}
2932
WORKDIR /
3033
COPY --from=builder /workspace/manager .
3134
RUN useradd -u 1002 nonroot

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ run: manifests generate fmt vet ## Run a controller from your host.
7272
go run ./main.go
7373

7474
docker-build: manifests generate fmt vet #test ## Build docker image with the manager. Disable the test but keep the validations to fail fast
75-
docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} . -t ${IMG}
76-
77-
#docker-build-proxy: test
78-
# docker build --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} build . -t ${IMG}
75+
docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} \
76+
--build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH} . -t ${IMG}
7977

8078
docker-push: ## Push docker image with the manager.
8179
docker push ${IMG}

0 commit comments

Comments
 (0)