-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Create build and release pipeline for Tern
This commit makes changes to package Tern and upload it to PyPI after each new release version. Specifically, the following changes are relevant: 1) Add a pypi_deploy job+workflow to config.yml that will only trigger on GitHub version tags. The pypi_deploy job installs package requirements and creates a ~/.pypirc file with PyPI credentials (via circleci private environment variables). The value of these env. variables is not accessible by forked repositories but care should be taken when merging PRs to check if any forked repositories are making changes to .circleci/config.yml in a bad-faith attempt to expose their values. pypi_deploy goes on to package tern using setup.py and then pushes the package to PyPI using twine. 2) Add a VerifyVersion custom command to setup.py. The VerifyVersion command 'verify' is called in .circleci/config.yml to make sure that the git tag ($CIRCLE_TAG) matches the version of the project according to tern/__init__.py before packaging Tern and pushing to PyPI. If not, return a helpful error message that highlights the discrepancy between the git tag and Version declared in tern/__init__.py and do not push to PyPI. 3) Add a setup.cfg file to utilize the pbr module. The pbr module will allow for a cleaner setup.py file and does a lot of the work that setup.py was previously doing for us. This commit moves most of the code previously in setup.py to an INI-like setup.cfg file and removes the custom parsing functions (_read_long_desc() and _get_requirements()). Using pbr is preferred for easier and cleaner setuptools package management. Resolves #287 Resolves #211 Signed-off-by: Rose Judge <rjudge@vmware.com>
- Loading branch information
Showing
4 changed files
with
97 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
include tern/command_lib/*.yml | ||
include tern/tools/fs_hash.sh | ||
recursive-include tern/scripts *.sh *.list | ||
prune ci | ||
prune tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2019 VMware, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
[metadata] | ||
name = tern | ||
author = VMware Inc | ||
author-email = nishak@vmware.com | ||
summary = An inspection tool to find the OSS compliance metadata of the packages installed in a container image. | ||
description-file = README.md | ||
description-content-type = text/markdown; charset=UTF-8 | ||
home-page = https://github.com/vmware/tern/ | ||
project_urls = | ||
Documentation = https://github.com/vmware/tern/tree/master/docs | ||
Source Code = https://github.com/vmware/tern | ||
Issues = https://github.com/vmware/tern/issues | ||
license = BSD-2.0 | ||
keywords = | ||
Distribution | ||
Container | ||
Cloud-Native | ||
classifier = | ||
Development Status :: 3 - Alpha | ||
Environment :: Console | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: BSD License | ||
Natural Language :: English | ||
Operating System :: POSIX | ||
Operating System :: POSIX :: Linux | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Topic :: Software Development | ||
|
||
[files] | ||
packages = | ||
tern | ||
|
||
[options] | ||
include_package_data = True | ||
|
||
[entry_points] | ||
console_scripts = | ||
tern = tern.__main__:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters