File tree 1 file changed +36
-0
lines changed 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ node (' python' ) {
2
+
3
+ withCredentials([[$class : ' StringBinding' , credentialsId : ' f5e83850-62a3-430c-b5b8-3351e9894df4' , variable : ' SECRET' ]]) {
4
+
5
+ def setup = {
6
+ git url : ' https://github.com/googlecloudplatform/getting-started-python'
7
+ env. PATH = " ${ env.PATH} :/root/google-cloud-sdk/bin"
8
+ env. GOOGLE_APPLICATION_CREDENTIALS = " /etc/gcloud-service-account/gcloud-service-account"
9
+ sh " ./decrypt-secrets.sh ${ env.SECRET} "
10
+
11
+ sh " gcloud auth activate-service-account --key-file=/etc/gcloud-service-account/gcloud-service-account"
12
+ sh " gcloud config set project verdant-future-95122"
13
+ sh " pip install nox-automation tox"
14
+ }
15
+
16
+
17
+ branches = [:]
18
+
19
+ branches[0 ] = {
20
+ node (' python' ) {
21
+ setup()
22
+ sh " cp config.py 1-hello-world/; cd 1-hello-world; tox"
23
+ }
24
+ }
25
+
26
+ branches[1 ] = {
27
+ node(' python' ) {
28
+ setup()
29
+ sh " cp config.py 2-structured-data/; cd 2-structured-data; tox"
30
+ }
31
+ }
32
+ parallel(branches)
33
+ }
34
+
35
+ }
36
+
You can’t perform that action at this time.
0 commit comments