AUTH-2854: Create cloudflared RPMs

This commit is contained in:
Michael Borkenstein 2020-06-30 10:43:54 -05:00
parent 772ccc9607
commit 2ce6720a6e
2 changed files with 32 additions and 3 deletions

View File

@ -71,12 +71,20 @@ test: vet
test-ssh-server: test-ssh-server:
docker-compose -f ssh_server_tests/docker-compose.yml up docker-compose -f ssh_server_tests/docker-compose.yml up
.PHONY: publish-deb define publish_package
publish-deb: cloudflared-deb
for HOST in $(CF_PKG_HOSTS); do \ for HOST in $(CF_PKG_HOSTS); do \
ssh-keyscan -t rsa $$HOST >> ~/.ssh/known_hosts; \ ssh-keyscan -t rsa $$HOST >> ~/.ssh/known_hosts; \
scp -4 cloudflared_$(VERSION)_amd64.deb cfsync@$$HOST:/state/cf-pkg/staging/apt/$(FLAVOR)/cloudflared/; \ scp -4 cloudflared_$(VERSION)_amd64.deb cfsync@$$HOST:/state/cf-pkg/staging/$(1)/$(FLAVOR)/cloudflared/; \
done done
endef
.PHONY: publish-deb
publish-deb: cloudflared-deb
$(call publish_package,apt)
.PHONY: publish-rpm
publish-rpm: cloudflared-rpm
$(call publish_package,yum)
.PHONY: cloudflared-deb .PHONY: cloudflared-deb
cloudflared-deb: cloudflared cloudflared-deb: cloudflared
@ -85,6 +93,13 @@ cloudflared-deb: cloudflared
fakeroot fpm -C $(PACKAGE_DIR) -s dir -t deb --deb-compression bzip2 \ fakeroot fpm -C $(PACKAGE_DIR) -s dir -t deb --deb-compression bzip2 \
-a $(TARGET_ARCH) -v $(VERSION) -n cloudflared cloudflared=/usr/local/bin/ -a $(TARGET_ARCH) -v $(VERSION) -n cloudflared cloudflared=/usr/local/bin/
.PHONY: cloudflared-rpm
cloudflared-rpm: cloudflared
mkdir -p $(PACKAGE_DIR)
cp cloudflared $(PACKAGE_DIR)/cloudflared
fakeroot fpm -C $(PACKAGE_DIR) -s dir -t rpm --rpm-compression bzip2 \
-a $(TARGET_ARCH) -v $(VERSION) -n cloudflared cloudflared=/usr/local/bin/
.PHONY: cloudflared-darwin-amd64.tgz .PHONY: cloudflared-darwin-amd64.tgz
cloudflared-darwin-amd64.tgz: cloudflared cloudflared-darwin-amd64.tgz: cloudflared
tar czf cloudflared-darwin-amd64.tgz cloudflared tar czf cloudflared-darwin-amd64.tgz cloudflared

View File

@ -170,6 +170,20 @@ jessie: *stretch
buster: *stretch buster: *stretch
centos-7:
publish-rpm:
build_dir: *build_dir
builddeps:
- https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
post-cache:
- sudo yum install -y fakeroot
- wget https://golang.org/dl/go1.12.9.linux-amd64.tar.gz -P /tmp/
- sudo tar -C /usr/local -xzf /tmp/go1.12.9.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- export GOOS=linux
- export GOARCH=amd64
- make publish-rpm
# cfsetup compose # cfsetup compose
default-stack: test_dbconnect default-stack: test_dbconnect
test_dbconnect: test_dbconnect: