Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- image: circleci/python:2.7
environment:
DISTROS: trusty xenial bionic el6 el7 el8
DOCKER_DISTROS: trusty xenial bionic centos6 centos7 centos8
DOCKER_DISTROS: trusty bionic centos6 centos7 centos8
DOCKER_RUN: |-
docker run -w /code/st2-sso-backend --volumes-from st2-sso-backend-vol
-e PKG_VERSION=$PKG_VERSION
Expand All @@ -90,6 +90,9 @@ jobs:
for dist in $DOCKER_DISTROS; do
docker pull stackstorm/buildpack:$dist
done
echo "<-- BEGIN DOCKER IMAGE LIST -->"
docker image list
echo "<-- END DOCKER IMAGE LIST -->"
- run:
name: Setup ~/.circlerc environment variables
command: |
Expand Down Expand Up @@ -134,7 +137,7 @@ jobs:
eval ${DOCKER_RUN} stackstorm/buildpack:centos7 make play rpm
docker cp st2-sso-backend-vol:/code/st2-sso-backend/build/x86_64/st2-sso-backend-${PKG_VERSION}-${PKG_RELEASE}.x86_64.rpm ~/st2-sso-backend/build/el7
# 5. Build RHEL 8 packages
eval ${DOCKER_RUN} stackstorm/buildpack:centos8 "yum install -y which; make play rpm"
eval ${DOCKER_RUN} stackstorm/buildpack:centos8 make play rpm
docker cp st2-sso-backend-vol:/code/st2-sso-backend/build/x86_64/st2-sso-backend-${PKG_VERSION}-${PKG_RELEASE}.x86_64.rpm ~/st2-sso-backend/build/el8
# List poduced artifacts
ls -la ~/st2-sso-backend/build/*/*
Expand Down
28 changes: 22 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,28 @@ PKGBUILDDIR = build
PYCACHEDIR = __pycache__
EGGINFODIR = *.egg-info

DEBIAN := 0
REDHAT := 0

ifneq (,$(wildcard /etc/debian_version))
DEBIAN := 1
DEB_DISTRO := $(shell lsb_release -cs)
REDHAT_DISTRO := 0
DEBIAN := 1
else
REDHAT := 1
REDHAT_DISTRO := $(shell rpm --eval '%{rhel}')
DEB_DISTRO := unstable
REDHAT := 1
endif

DEB_DISTRO := $(shell lsb_release -cs)
REDHAT_DISTRO := $(shell rpm --eval '%{rhel}')

ifeq ($(DEB_DISTRO),)
DEB_DISTRO := "unstable"
endif

ifeq ($(REDHAT_DISTRO),)
REDHAT_DISTRO := 0
endif

ifeq ($(REDHAT_DISTRO),$(shell echo "%{rhel}"))
REDHAT_DISTRO := 0
endif

ifeq ($(DEB_DISTRO),bionic)
Expand Down Expand Up @@ -100,6 +114,8 @@ play:
@echo TRAVIS_PULL_REQUEST=$(TRAVIS_PULL_REQUEST)
@echo NOSE_OPTS=$(NOSE_OPTS)
@echo
@echo "`cat /etc/os-release`"
@echo

.PHONY: clean
clean:
Expand Down