|
22 | 22 | specific language governing permissions and limitations
|
23 | 23 | under the License.
|
24 | 24 |
|
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. |
33 | 30 |
|
34 | 31 | Requirements
|
35 | 32 |
|
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. |
39 | 46 |
|
40 |
| -argparse |
41 |
| -blackduck |
42 |
| -csv |
43 |
| -logging |
44 |
| -re |
45 |
| -openpyxl |
46 |
| -sys |
| 47 | +Install python packages with the following command: |
47 | 48 |
|
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 |
54 | 50 |
|
55 | 51 | Using
|
56 | 52 |
|
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: |
60 | 54 |
|
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 |
62 | 56 |
|
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. |
65 | 61 |
|
66 | 62 | '''
|
67 | 63 |
|
|
0 commit comments