File tree Expand file tree Collapse file tree 9 files changed +36
-9
lines changed
appengine/standard_python3/bundled-services Expand file tree Collapse file tree 9 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import re
17
18
import subprocess
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import re
17
18
import subprocess
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import re
17
18
import subprocess
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 5 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import time
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import time
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import time
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import time
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import uuid
18
19
19
20
import backoff
20
21
import pytest
21
22
import requests
22
23
24
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
25
+
23
26
24
27
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
25
28
def gcloud_cli (command ):
@@ -36,7 +39,7 @@ def gcloud_cli(command):
36
39
37
40
Raises Exception with the stderr output of the last attempt on failure.
38
41
"""
39
- full_command = f"gcloud { command } --quiet --format=json"
42
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
40
43
print ("Running command:" , full_command )
41
44
42
45
output = subprocess .run (
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import json
16
+ import os
16
17
import subprocess
17
18
import time
18
19
import uuid
21
22
import pytest
22
23
import requests
23
24
25
+ project_id = os .environ ["GOOGLE_CLOUD_PROJECT" ]
26
+
24
27
25
28
@backoff .on_exception (backoff .expo , Exception , max_tries = 3 )
26
29
def gcloud_cli (command ):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
37
40
38
41
Raises Exception with the stderr output of the last attempt on failure.
39
42
"""
40
- full_command = f"gcloud { command } --quiet --format=json"
43
+ full_command = f"gcloud { command } --quiet --format=json --project { project_id } "
41
44
print ("Running command:" , full_command )
42
45
43
46
output = subprocess .run (
You can’t perform that action at this time.
0 commit comments