diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-10 07:22:02 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-10 07:22:02 +0000 |
commit | 866f9d3e63bc987a20967a5e2fb281c86193dd78 (patch) | |
tree | f2dd8c63cd008212d69b22914e7faea30fcf6d21 | |
parent | 05c67a66ce9333b22fd91a4ecd92ecf2eff50adc (diff) |
automatic import of python-shopcloud-secrethub
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-shopcloud-secrethub.spec | 265 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 267 insertions, 0 deletions
@@ -0,0 +1 @@ +/shopcloud_secrethub-2.15.0.tar.gz diff --git a/python-shopcloud-secrethub.spec b/python-shopcloud-secrethub.spec new file mode 100644 index 0000000..0faae45 --- /dev/null +++ b/python-shopcloud-secrethub.spec @@ -0,0 +1,265 @@ +%global _empty_manifest_terminate_build 0 +Name: python-shopcloud-secrethub +Version: 2.15.0 +Release: 1 +Summary: CLI tool for the Shopcloud SecretHub +License: MIT +URL: https://github.com/Talk-Point/shopcloud-secrethub-cli +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a6/68/c16039a74d6282dfd2a624ccccd4fd8cd073280aa296b75536c30755f10c/shopcloud_secrethub-2.15.0.tar.gz +BuildArch: noarch + +Requires: python3-requests + +%description +# Shopcloud SecretHub CLI + +The SecretHub CLI provides the command-line interface to interact with the SecretHub API. + +## install + +``` +$ pip install shopcloud_secrethub +``` + +### Usage + + +__Reading and writing secrets:__ + +```sh +$ secrethub auth +$ secrethub read <secret-name> +$ secrethub write <secret-name> <value> +``` + + +__Provisioning your applications with secrets:__ + +Provision a template file + +```sh +$ secrethub inject -i app.temp.yaml -o app.yaml + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +Provision to the environment + +```sh +$ eval `secrethub printenv -i app.temp.yaml` + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +__in Code:__ + +```py +from shopcloud_secrethub import SecretHub +hub = SecretHub(user_app="test-script", api_token='<TOKEN>') +hub.read('talk-point/test-repo/secret_key') +``` + +### Deploy to PyPi + +```sh +$ rm -rf build dist +$ pip3 install wheel twine +$ python3 setup.py sdist bdist_wheel +$ twine upload dist/* +``` + + +%package -n python3-shopcloud-secrethub +Summary: CLI tool for the Shopcloud SecretHub +Provides: python-shopcloud-secrethub +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-shopcloud-secrethub +# Shopcloud SecretHub CLI + +The SecretHub CLI provides the command-line interface to interact with the SecretHub API. + +## install + +``` +$ pip install shopcloud_secrethub +``` + +### Usage + + +__Reading and writing secrets:__ + +```sh +$ secrethub auth +$ secrethub read <secret-name> +$ secrethub write <secret-name> <value> +``` + + +__Provisioning your applications with secrets:__ + +Provision a template file + +```sh +$ secrethub inject -i app.temp.yaml -o app.yaml + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +Provision to the environment + +```sh +$ eval `secrethub printenv -i app.temp.yaml` + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +__in Code:__ + +```py +from shopcloud_secrethub import SecretHub +hub = SecretHub(user_app="test-script", api_token='<TOKEN>') +hub.read('talk-point/test-repo/secret_key') +``` + +### Deploy to PyPi + +```sh +$ rm -rf build dist +$ pip3 install wheel twine +$ python3 setup.py sdist bdist_wheel +$ twine upload dist/* +``` + + +%package help +Summary: Development documents and examples for shopcloud-secrethub +Provides: python3-shopcloud-secrethub-doc +%description help +# Shopcloud SecretHub CLI + +The SecretHub CLI provides the command-line interface to interact with the SecretHub API. + +## install + +``` +$ pip install shopcloud_secrethub +``` + +### Usage + + +__Reading and writing secrets:__ + +```sh +$ secrethub auth +$ secrethub read <secret-name> +$ secrethub write <secret-name> <value> +``` + + +__Provisioning your applications with secrets:__ + +Provision a template file + +```sh +$ secrethub inject -i app.temp.yaml -o app.yaml + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +Provision to the environment + +```sh +$ eval `secrethub printenv -i app.temp.yaml` + +# app.temp.yaml +env_variables: + ENV: {{ talk-point/test-repo/env }} + SECRET_KEY: {{ talk-point/test-repo/secret_key }} + +``` + +__in Code:__ + +```py +from shopcloud_secrethub import SecretHub +hub = SecretHub(user_app="test-script", api_token='<TOKEN>') +hub.read('talk-point/test-repo/secret_key') +``` + +### Deploy to PyPi + +```sh +$ rm -rf build dist +$ pip3 install wheel twine +$ python3 setup.py sdist bdist_wheel +$ twine upload dist/* +``` + + +%prep +%autosetup -n shopcloud-secrethub-2.15.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-shopcloud-secrethub -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.15.0-1 +- Package Spec generated @@ -0,0 +1 @@ +1c170eb4d1482d33628c74cc6afc4eb4 shopcloud_secrethub-2.15.0.tar.gz |