Skip to content

Commit

Permalink
chore: Hide rpm publish env variables (#116)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
  • Loading branch information
SergK committed Sep 4, 2024
1 parent 629044f commit 7a2cd5e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/templates/applications/rpm-package/Makefile.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.PHONY: prepare rpm-build clean rpm-lint
.PHONY: rpm-prepare rpm-build clean rpm-lint rpm-publish

CURRENT_DIR=$(shell pwd)
DIST_DIR=${CURRENT_DIR}/dist
# Aligned with the maven build output, change if needed
BINNARY=${CURRENT_DIR}/target/*.jar

NAME ?= {{.Name}}
Expand All @@ -17,7 +18,7 @@ rpm-lint:
rpm-prepare:
mkdir -p rpmbuild/SOURCES
mkdir -p ${DIST_DIR}/$(NAME)-$(VERSION)
cp -r ${BINNARY} ${DIST_DIR}/$(NAME)-$(VERSION)
cp -r ${BINNARY} ${DIST_DIR}/$(NAME)-$(VERSION)/$(NAME)
cp -r ${NAME}.service rpmbuild/SOURCES/$(NAME).service
tar -czvf rpmbuild/SOURCES/$(NAME)-$(VERSION).tar.gz -C ${DIST_DIR} $(NAME)-$(VERSION)

Expand All @@ -30,8 +31,9 @@ rpm-build: rpm-prepare
--define "RELEASE_NUMBER $(RELEASE)"
mv rpmbuild/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).$(ARCH).rpm $(DIST_DIR)

# Ensure env variables are set
rpm-publish:
curl -v --user "${CI_USERNAME}:${CI_PASSWORD}" \
@curl --user "${CI_USERNAME}:${CI_PASSWORD}" \
--upload-file ${DIST_DIR}/${NAME}-${VERSION}-${RELEASE}.$(ARCH).rpm \
${NEXUS_HOST_URL}/repository/edp-yum-snapshots/$(ARCH)/os/Packages/

Expand Down

0 comments on commit 7a2cd5e

Please sign in to comment.