Skip to content

Commit 6d78f65

Browse files
committed
batch update of project phase script
1 parent c217db7 commit 6d78f65

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

examples/client/batch_update_project_phase.py

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,42 @@
2222
specific language governing permissions and limitations
2323
under the License.
2424
25-
This script will perform bulk update of Project version PHASE
26-
based on the content of an EXCEL file
27-
28-
Each row of a file is expected to containe a field for Project Name
29-
Project Version and desired phase
30-
31-
Sript will iterate through the rows of a spreadsheet and issue
32-
an API call per row.
25+
This script will perform bulk update of Project version PHASE based on
26+
the content of an EXCEL file. Each row of a file is expected to contain
27+
a field for Project Name Project Version and desired phase.
28+
Script will iterate through the rows of a spreadsheet and issue an API
29+
call per row.
3330
3431
Requirements
3532
36-
python3 vresion 3.8 or newer recommended
37-
38-
the following packages are used by the script and should be installed prior to use:
33+
- python3 version 3.8 or newer recommended
34+
- the following packages are used by the script and should be installed
35+
prior to use:
36+
argparse
37+
blackduck
38+
csv
39+
logging
40+
re
41+
openpyxl
42+
sys
43+
- Blackduck instance
44+
- API token with sufficient privileges to perform project version phase
45+
change.
3946
40-
argparse
41-
blackduck
42-
csv
43-
logging
44-
re
45-
openpyxl
46-
sys
47+
Install python packages with the following command:
4748
48-
install them with the following command:
49-
50-
pip3 install argparse blackduck csv logging re openpyxl sys
51-
52-
Blackduck instance
53-
API token with sufficient privileges to perform project version phase change
49+
pip3 install argparse blackduck csv logging re openpyxl sys
5450
5551
Using
5652
57-
place the token into a file (token in this example)
58-
59-
execute
53+
place the token into a file (token in this example) then execute:
6054
61-
python3 batch_update_project_phase.py -u https://blackduck-host -t token -nv -i excel-file-with-data
55+
python3 batch_update_project_phase.py -u https://blackduck-host -t token -nv -i excel-file-with-data
6256
63-
Projects and project versions that are listed in the file but are not present on the blackduck instance will be skipped.
64-
If a project version is already at a requested phase, no update will be executed
57+
Projects and project versions that are listed in the file but are not
58+
present on the blackduck instance will be skipped.
59+
If a project version is already at a requested phase, no update will
60+
be executed.
6561
6662
'''
6763

0 commit comments

Comments
 (0)