Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhvigodithi committed Jul 27, 2023
2 parents 70507a0 + 5b00d67 commit 14076de
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/groovy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- name: Run Tests
run: |
./gradlew test --info --tests=TestCloseGithubIssue
./gradlew test --info
- name: Upload Coverage Report
uses: codecov/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestCloseBuildSuccessGithubIssue.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TestCloseBuildSuccessGithubIssue extends BuildPipelineTest {

@Test
public void testExistingGithubIssue() {
super.testPipeline('tests/jenkins/jobs/CloseBuildSuccessGithubIssue_Jenkinsfile')
super.testPipeline('tests/jenkins/jobs/CloseBuildSuccessGithubIssue_JenkinsFile')
assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue list --repo https://github.com/opensearch-project/OpenSearch.git -S \"[AUTOCUT] Distribution Build Failed for OpenSearch-2.0.0 in:title\" --label autocut,v2.0.0 --json number --jq '.[0].number', returnStdout=true}"))
assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue close bbb\nccc -R opensearch-project/OpenSearch --comment \"Closing the issue as the distribution build for OpenSearch has passed for version: **2.0.0**.\n Please see build log at www.example.com/jobs/test/123/consoleFull\", returnStdout=true}"))
}
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/TestCloseGithubIssue.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class TestCloseGithubIssue extends BuildPipelineTest {
'label101',
))
super.testPipeline("tests/jenkins/jobs/CloseGithubIssue_JenkinsFile")
// assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue list --repo https://github.com/opensearch-project/opensearch-build -S \"Test GH issue title in:title\" --label label101 --json number --jq '.[0].number', returnStdout=true}"))
// assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue close bbb\nccc -R opensearch-project/opensearch-build --comment \"Test GH issue close comment\", returnStdout=true}"))
assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue list --repo https://github.com/opensearch-project/opensearch-build -S \"Test GH issue title in:title\" --label label101 --json number --jq '.[0].number', returnStdout=true}"))
assertThat(getCommands('sh', 'script'), hasItem("{script=gh issue close bbb\nccc -R opensearch-project/opensearch-build --comment \"Test GH issue close comment\", returnStdout=true}"))
}

def getCommands(method, text) {
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
./gradlew --stop
rm -rf ~/.gradle

if ! (uname -s | grep -i NT); then
if command -v docker > /dev/null; then
echo "Check existing dockercontainer"
docker ps -a
docker stop `docker ps -qa` > /dev/null 2>&1 || echo
docker rm `docker ps -qa` > /dev/null 2>&1 || echo
docker rm --force `docker ps -qa` > /dev/null 2>&1 || echo
echo "Stop existing dockercontainer"
docker ps -a

Expand Down
4 changes: 2 additions & 2 deletions vars/runGradleCheck.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ void call(Map args = [:]) {
./gradlew --stop
rm -rf ~/.gradle
if ! (uname -s | grep -i NT); then
if command -v docker > /dev/null; then
echo "Check existing dockercontainer"
docker ps -a
docker stop `docker ps -qa` > /dev/null 2>&1 || echo
docker rm `docker ps -qa` > /dev/null 2>&1 || echo
docker rm --force `docker ps -qa` > /dev/null 2>&1 || echo
echo "Stop existing dockercontainer"
docker ps -a
Expand Down

0 comments on commit 14076de

Please sign in to comment.