tgwrap 0.9.0__py3-none-any.whl → 0.9.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tgwrap/deploy.py +5 -5
- tgwrap/main.py +10 -0
- {tgwrap-0.9.0.dist-info → tgwrap-0.9.2.dist-info}/METADATA +1 -1
- tgwrap-0.9.2.dist-info/RECORD +11 -0
- tgwrap-0.9.0.dist-info/RECORD +0 -11
- {tgwrap-0.9.0.dist-info → tgwrap-0.9.2.dist-info}/LICENSE +0 -0
- {tgwrap-0.9.0.dist-info → tgwrap-0.9.2.dist-info}/WHEEL +0 -0
- {tgwrap-0.9.0.dist-info → tgwrap-0.9.2.dist-info}/entry_points.txt +0 -0
tgwrap/deploy.py
CHANGED
@@ -188,10 +188,7 @@ def prepare_deploy_config(step, config, source_dir, source_config_dir, target_di
|
|
188
188
|
|
189
189
|
printer.verbose(f'Include substack modules: {include_modules}')
|
190
190
|
|
191
|
-
|
192
|
-
# include_modules = config['include_modules'] if len(config.get('include_modules')) > 0 else source_modules
|
193
|
-
include_modules = substack['include_modules'] if len(substack.get('include_modules', {})) > 0 else source_modules
|
194
|
-
printer.verbose(f'Include modules: {include_modules}')
|
191
|
+
include_modules = substack.get('include_modules', [])
|
195
192
|
|
196
193
|
if include_modules:
|
197
194
|
# get all directories in the substack and create an exlude_modules list from that
|
@@ -199,7 +196,10 @@ def prepare_deploy_config(step, config, source_dir, source_config_dir, target_di
|
|
199
196
|
exclude_modules = list(set(source_directories) - set(include_modules))
|
200
197
|
else:
|
201
198
|
exclude_modules = substack.get('exclude_modules', [])
|
202
|
-
|
199
|
+
|
200
|
+
printer.verbose(f'Include modules: {include_modules}')
|
201
|
+
printer.verbose(f'Exclude modules: {include_modules}')
|
202
|
+
|
203
203
|
if os.path.exists(source_path):
|
204
204
|
deploy_actions[f'substack -> {substack["target"]}'] = {
|
205
205
|
"source": source_path,
|
tgwrap/main.py
CHANGED
@@ -781,6 +781,12 @@ class TgWrap():
|
|
781
781
|
Posts the payload to the given (Azure) data collection endpoint
|
782
782
|
"""
|
783
783
|
|
784
|
+
def mask_basic_auth(url):
|
785
|
+
# Regular expression to match basic authentication credentials in URL
|
786
|
+
auth_pattern = re.compile(r"(https?://)([^:@]+):([^:@]+)@(.+)")
|
787
|
+
# Return the url without the basic auth part
|
788
|
+
return auth_pattern.sub(r"\1\4", url)
|
789
|
+
|
784
790
|
#
|
785
791
|
# Everything we do here, can be done using native python. And probably this is preferable as well.
|
786
792
|
# But I have decided to follow (at least for now) the overall approach of the app and that is
|
@@ -854,6 +860,9 @@ class TgWrap():
|
|
854
860
|
if not repo:
|
855
861
|
raise Exception(f'Could not get git repo info: {repo}')
|
856
862
|
|
863
|
+
# Remove the basic auth info if it is part of the url
|
864
|
+
repo = mask_basic_auth(repo)
|
865
|
+
|
857
866
|
# Get the current path in the repo
|
858
867
|
rc = subprocess.run(
|
859
868
|
shlex.split('git rev-parse --show-prefix'),
|
@@ -908,6 +917,7 @@ class TgWrap():
|
|
908
917
|
)
|
909
918
|
|
910
919
|
resp.raise_for_status()
|
920
|
+
self.printer.success('Analyze results logged to DCE')
|
911
921
|
|
912
922
|
except requests.exceptions.RequestException as e:
|
913
923
|
# we warn but continue
|
@@ -0,0 +1,11 @@
|
|
1
|
+
tgwrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
tgwrap/analyze.py,sha256=CsSaGv-be6ATy36z9X7x00gpKY59soJys2VbIzD-tmg,8726
|
3
|
+
tgwrap/cli.py,sha256=jP7KuZzqwW2693fVsqEChzIto2T3YyPcSc9kW8ElDWI,29727
|
4
|
+
tgwrap/deploy.py,sha256=-fSk-Ix_HqrXY7KQX_L27TnFzIuhBHYv4xYJW6zRDN4,10243
|
5
|
+
tgwrap/main.py,sha256=9v8c7o32xmmkgEOgrUCiDCcivol4lRzauS6L0pvXdLw,81157
|
6
|
+
tgwrap/printer.py,sha256=dkcOCPIPB-IP6pn8QMpa06xlcqPFVaDvxnz-QEpDJV0,2663
|
7
|
+
tgwrap-0.9.2.dist-info/LICENSE,sha256=VT-AVxIXt3EQTC-7Hy1uPGnrDNJLqfcgLgJD78fiyx4,1065
|
8
|
+
tgwrap-0.9.2.dist-info/METADATA,sha256=n9o0ybKKHmlNA6XVq1HLnqPffzq5idUvIu5V45RoAAY,13334
|
9
|
+
tgwrap-0.9.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
10
|
+
tgwrap-0.9.2.dist-info/entry_points.txt,sha256=H8X0PMPmd4aW7Y9iyChZ0Ug6RWGXqhRUvHH-6f6Mxz0,42
|
11
|
+
tgwrap-0.9.2.dist-info/RECORD,,
|
tgwrap-0.9.0.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
tgwrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
tgwrap/analyze.py,sha256=CsSaGv-be6ATy36z9X7x00gpKY59soJys2VbIzD-tmg,8726
|
3
|
-
tgwrap/cli.py,sha256=jP7KuZzqwW2693fVsqEChzIto2T3YyPcSc9kW8ElDWI,29727
|
4
|
-
tgwrap/deploy.py,sha256=giLjpN9b4TWov2w8fWyB6jinAUbupMTCUoZHVT442DM,10421
|
5
|
-
tgwrap/main.py,sha256=FqpCZ3xGD33YD3IesFMq2QI2AvSv0_4txRpnoPX19Z4,80691
|
6
|
-
tgwrap/printer.py,sha256=dkcOCPIPB-IP6pn8QMpa06xlcqPFVaDvxnz-QEpDJV0,2663
|
7
|
-
tgwrap-0.9.0.dist-info/LICENSE,sha256=VT-AVxIXt3EQTC-7Hy1uPGnrDNJLqfcgLgJD78fiyx4,1065
|
8
|
-
tgwrap-0.9.0.dist-info/METADATA,sha256=IYdY5B0k1OswfcfVCbdwFOHs_itQXKq9fgbtjZPusIw,13334
|
9
|
-
tgwrap-0.9.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
10
|
-
tgwrap-0.9.0.dist-info/entry_points.txt,sha256=H8X0PMPmd4aW7Y9iyChZ0Ug6RWGXqhRUvHH-6f6Mxz0,42
|
11
|
-
tgwrap-0.9.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|