Skip to content

Commit

Permalink
Use imlteam/copr (#59)
Browse files Browse the repository at this point in the history
* Use imlteam/copr

Switch from using module-tools to using the imlteam/copr image

Signed-off-by: Joe Grund <[email protected]>

* remove spec detection

Signed-off-by: Joe Grund <[email protected]>

* fixups

Signed-off-by: Joe Grund <[email protected]>

* another fixup

Signed-off-by: Joe Grund <[email protected]>

* fixup setup dir

Signed-off-by: Joe Grund <[email protected]>

* debug

Signed-off-by: Joe Grund <[email protected]>

* fixups

Signed-off-by: Joe Grund <[email protected]>

* specify python2

Signed-off-by: Joe Grund <[email protected]>

* Add missing files to manifest.

* copy sources to outdir

Signed-off-by: Joe Grund <[email protected]>

* spaces -> tabs

Signed-off-by: Joe Grund <[email protected]>

* debug

Signed-off-by: Joe Grund <[email protected]>

* overwrite symlinks

Signed-off-by: Joe Grund <[email protected]>

* remove symlinks before overwriting

Signed-off-by: Joe Grund <[email protected]>

* More copying

Signed-off-by: Joe Grund <[email protected]>

* More copying

Signed-off-by: Joe Grund <[email protected]>

* spaces -> tabs

Signed-off-by: Joe Grund <[email protected]>

* list correct dir

Signed-off-by: Joe Grund <[email protected]>

* fixups

Signed-off-by: Joe Grund <[email protected]>
  • Loading branch information
jgrund authored Jan 7, 2019
1 parent 36ce468 commit f90710e
Show file tree
Hide file tree
Showing 29 changed files with 42 additions and 749 deletions.
12 changes: 11 additions & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
include include/copr_srpm.mk
srpm:
dnf -y install 'dnf-command(copr)' rpmdevtools wget python2
dnf -y --setopt=reposdir=/tmp/yum.repos.d copr enable clime/rpkg-client
dnf -y install rpkg
python setup.py sdist -d ./
rpkg srpm --outdir=$(outdir) --spec=python-iml-agent.spec
for x in chroma-agent.service 50-chroma-agent.preset logrotate.cfg iml-storage-server.target 10-device-scanner.target.conf iml-agent-*.tar.gz; \
do \
rm -rf $(outdir)/$$x; \
cp $$x $(outdir); \
done
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MANIFEST
python-iml-agent.spec
dist/
chroma_agent/.dev_config_store/
*.pyc
Expand Down
37 changes: 21 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ jobs:
- stage: test
name: "mock build test"
script:
- ./include/travis/run_in_centos7_docker.sh include/travis/mock_build_test.sh
- docker run -dit --name mock -v "$(pwd)":/mockdir --cap-add=SYS_ADMIN --privileged imlteam/mock
- docker exec -it mock bash -xec 'yum install -y dnf'
- docker exec -it mock bash -xec 'chown root.root /mockdir/*'
- docker exec -it mock bash -xec 'mkdir -p /tmp/build'
- docker exec -it mock bash -xec 'cd /mockdir && make -f .copr/Makefile outdir=/tmp/build'
- docker exec -it mock bash -xec 'mock /tmp/build/python-iml-agent-*.el*.src.rpm -v --enable-network'
- stage: test
name: "Format Check"
python: "3.6"
Expand All @@ -25,12 +30,23 @@ jobs:
script:
- black --check ./
- stage: cd
git:
depth: 999999
name: "Continuous Deployment"
script:
- include/travis/copr-deploy.sh prepare
- ./travis_wait "./include/travis/run_in_centos7_docker.sh include/travis/copr-deploy.sh build_srpm"
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre-devel
- export PACKAGE=python-iml-agent
- export CLONE_URL=https://github.com/whamcloud/iml-agent.git
- export SPEC=python-iml-agent.spec
- docker run -it -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e CLONE_URL="$CLONE_URL" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
- stage: deploy-copr
name: "Copr deploy"
script:
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre
- export PACKAGE=python-iml-agent
- export CLONE_URL=https://github.com/whamcloud/iml-agent.git
- export SPEC=python-iml-agent.spec
- docker run -it -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e CLONE_URL="$CLONE_URL" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
- stage: deploy-pypi
name: "PyPi deploy"
script: skip
Expand All @@ -43,17 +59,6 @@ jobs:
all_branches: true
distributions: sdist bdist_wheel
skip_upload_docs: true
- stage: deploy-copr
name: "Copr deploy"
script: skip
before_deploy:
- include/travis/copr-deploy.sh prepare
deploy:
skip_cleanup: true
provider: script
script: ./travis_wait "./include/travis/run_in_centos7_docker.sh include/travis/copr-deploy.sh build"
on:
all_branches: true
stages:
- test
- name: cd
Expand Down
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

6 changes: 1 addition & 5 deletions chroma_agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,16 @@
raise

try:
from scm_version import VERSION, PACKAGE_VERSION, IS_RELEASE, BUILD
from version import VERSION, PACKAGE_VERSION

__version__ = VERSION
__package_version__ = PACKAGE_VERSION
__build__ = BUILD
__is_release__ = IS_RELEASE
except ImportError:
from pkginfo import UnpackedSDist

pkg = UnpackedSDist(".")
__version__ = pkg.version
__package_version__ = __version__
__build__ = 1
__is_release__ = False


def package_version():
Expand Down
4 changes: 0 additions & 4 deletions chroma_agent/scm_version.py

This file was deleted.

2 changes: 2 additions & 0 deletions chroma_agent/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PACKAGE_VERSION = "4.1.2"
VERSION = "{}-1".format(PACKAGE_VERSION)
12 changes: 0 additions & 12 deletions include/.gitrepo

This file was deleted.

21 changes: 0 additions & 21 deletions include/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion include/Makefile

This file was deleted.

25 changes: 0 additions & 25 deletions include/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions include/common.mk

This file was deleted.

3 changes: 0 additions & 3 deletions include/copr-mfl.enc

This file was deleted.

82 changes: 0 additions & 82 deletions include/copr.mk

This file was deleted.

15 changes: 0 additions & 15 deletions include/copr_srpm.mk

This file was deleted.

62 changes: 0 additions & 62 deletions include/git-versioning.mk

This file was deleted.

3 changes: 0 additions & 3 deletions include/githooks.mk

This file was deleted.

18 changes: 0 additions & 18 deletions include/hooks/commit-msg

This file was deleted.

Loading

0 comments on commit f90710e

Please sign in to comment.