@@ -121,32 +121,6 @@ pipeline:
121121 spec :
122122 branch : <+pipeline.variables.target_branch>
123123 description : Explicitly clone repo to pull a commit created during reconciliation
124- - step :
125- type : Run
126- name : report_status_to_github_start
127- identifier : report_status_to_github_start
128- spec :
129- shell : Bash
130- command : |-
131- cd /harness/<+pipeline.variables.target_repo>
132- git log -2
133- latest_commit_sha=$(git log -1 --pretty=format:"%H")
134- echo ${latest_commit_sha}
135- pipeline_execution_github_status_key="Test framework - <+matrix.env.env_folder> - <+matrix.env.repo>:<+matrix.env.tag>"
136-
137- echo "Update PR status"
138- curl -i -X POST \
139- -H "Authorization: Bearer <+secrets.getValue("account.Github_Access_Token")>" \
140- -H "Accept: application/vnd.github.v3+json" \
141- https://api.github.com/repos/<+account.name>/datarobot-user-models/statuses/${latest_commit_sha} \
142- -d "{\"state\":\"pending\",\"target_url\":\"<+pipeline.execution.url>\",\"description\":\"Test is running\",\"context\":\"$pipeline_execution_github_status_key\"}"
143- outputVariables :
144- - name : pipeline_execution_github_status_key
145- type : String
146- value : pipeline_execution_github_status_key
147- - name : latest_commit_sha
148- type : String
149- value : latest_commit_sha
150124 - step :
151125 type : Run
152126 name : Run functional test in provided framework
@@ -165,41 +139,6 @@ pipeline:
165139 when :
166140 stageStatus : Success
167141 contextType : Pipeline
168- - step :
169- type : Run
170- name : report_status_to_github_end
171- identifier : report_status_to_github_end
172- spec :
173- shell : Bash
174- command : |-
175- latest_commit_sha="<+execution.steps.report_status_to_github_start.output.outputVariables.latest_commit_sha>"
176- github_status_key="<+execution.steps.report_status_to_github_start.output.outputVariables.pipeline_execution_github_status_key>"
177-
178- echo ${latest_commit_sha}
179- echo ${github_status_key}
180-
181- status_0="<+execution.steps.Run_1.status>"
182-
183- echo "Update PR status"
184-
185- if [[ "$status_0" == "SUCCEEDED" ]]; then
186- state="success"
187- description="Passed"
188- elif [[ "$status_0" == "PENDING" ]]; then
189- state="pending"
190- description="Pending"
191- else
192- state="failure"
193- description="Failed"
194- fi
195-
196- curl -i -u <+account.name>:<+secrets.getValue("account.Github_Access_Token")> \
197- -X POST \
198- -H "Accept: application/vnd.github.v3+json" \
199- https://api.github.com/repos/<+account.name>/datarobot-user-models/statuses/${latest_commit_sha} \
200- -d "{\"state\":\"$state\",\"target_url\":\"<+pipeline.execution.url>\",\"description\":\"$description\",\"context\":\"$github_status_key\"}"
201- when :
202- stageStatus : All
203142 caching :
204143 enabled : true
205144 paths : []
0 commit comments