Skip to content

Commit

Permalink
ignore changetypes with bug liquibase/liquibase#2644 .
Browse files Browse the repository at this point in the history
Better standardization of data checks on h2

Better standardization of data checks on h2

Updated setPrimaryKeyColumnRemarks.sql to match updated SQL

[DAT-9954] Created tests for EDB with EDB driver (#209)

* [DAT-9954] Created tests for EDB with EDB driver

* [DAT-9954] Config file fix

* [DAT-9954] Made requested fixes

* [DAT-9954]Made distinguishing EDB with PostgreSQL and EDB drivers more clear

* [DAT-9954]Made changes for github actions to run tests against both EDB with Postgres and EDB drivers

* [DAT-9954]Fixed automation-runner

* [DAT-9954]Fixed create-infra.sh and teardown-infra.sh

* [DAT-9954]Fixed create-infra.sh and teardown-infra.sh

* [DAT-9954]Fixed changeData tests

* fixed setPrimaryKeyColumnRemarks

Co-authored-by: KushnirykOleh <kushnirykoleh@gmail.com>

Added platform to mysql docker instances for compatability with Mac M1 machines

Revert "Added platform to mysql docker instances for compatability with Mac M1 machines"

This reverts commit 1414399.

Add platforms to ensure compatability with Mac M1 machines

paginate through results of workflow runs on client side

only paginate through a maximum of 10 pages

add missing values to returnData in workflow-helper.js (#215)

Updated jdbc driver versions to match new liquibase versions

Updated jaybird driver to 4.0.6

Updated build logic to rely on liquibase-sdk-maven-plugin (#225)

* Updated build logic to use liquibase-sdk-maven-plugin more heavily

Fall back to master build if branch is being computed

Corectly configure 0-SNAPSHOT liquibase in tests

Run 0-SNAPSHOT liquibase in tests in

Giving cockroachdb a bit more time to start

Log cockroach startup

Fixing build logic

removed comments from ignored tests

unignored sqlite for develop branch

reverted changes in CICD files
  • Loading branch information
AlexanderSashchenko authored and KushnirykOleh committed May 16, 2022
1 parent fe41b15 commit a2d76d8
Show file tree
Hide file tree
Showing 37 changed files with 106 additions and 303 deletions.
153 changes: 1 addition & 152 deletions .github/util/workflow-helper.js
Expand Up @@ -48,157 +48,6 @@ module.exports = ({github, context}) => {
return branch.replace("refs/heads/", "")
.replace("refs/heads/tags", "");

},

findMatchingBranch: async function (owner, repo, branchesToCheck) {
if (!branchesToCheck) {
if (context.payload.pull_request) {
branchesToCheck = [context.payload.pull_request.head.ref, context.payload.pull_request.base.ref, "main", "master"]
} else {
branchesToCheck = [context.payload.ref, "main", "master"]
}
}

for (let branchName of branchesToCheck) {
if (!branchName) {
console.log("Skipping empty branch name: " + branchName);
continue
}

branchName = this.cleanBranchRef(branchName);
try {
let branch = await github.rest.repos.getBranch({
"owner": owner,
"repo": repo,
"branch": branchName,
});

let returnData = {
"name": branchName,
"sha": branch.data.commit.sha,
};

//add PR info
let pulls = await github.rest.pulls.list({
"owner": owner,
"repo": repo,
"head": `${owner}:${branchName}`,
"per_page": 1,
"page": 1,
});

if (pulls.data.length === 0) {
console.log(`No pull request for branch ${branchName}`);

if (branchName === "master" || branchName === "main") {
console.log(`Expect no pull request for ${branchName}`);
} else {
continue;
}
} else {
console.log(`Found PR for branch ${branchName}`);

returnData.pullRequestId = pulls.data[0].number;
returnData.pullRequestState = pulls.data[0].state;
}

let pageNumber = 1;
const maxPagesToCheck = 10;
let matchingBuildFound = false;
while(!matchingBuildFound) {
try { //add build info
console.log("Reading workflow run results from page", pageNumber)
let runs = await github.rest.actions.listWorkflowRuns({
"owner": owner,
"repo": repo,
"workflow_id": "build.yml",
"per_page": 100,
"page": pageNumber,
});

if (runs.data.workflow_runs.length !== 0) {
for (let run of runs.data.workflow_runs) {
if (run.event === 'pull_request_target') {
if (!returnData.pullRequestId) {
console.log("Skipping pull_request_target from non-pull-request build " + run.html_url);
continue;
}
if (run.head_repository && run.head_repository.fork) {
console.log("Skipping pull_request_target from fork " + run.head_repository.full_name);
continue;
}
}
if (run.head_branch != branchName) {
console.log("Skipping run from branch: " + run.head_branch);
continue;
}

console.log(`Found build for branch ${branchName}`);

if (!returnData.workflowId) {
returnData.workflowId = run.id;
}

if (!returnData.runNumber) {
returnData.runNumber = run.run_number;
returnData.runAttempt = run.run_attempt;
returnData.runStatus = run.status;
returnData.runConclusion = run.conclusion;
returnData.runHtmlUrl = run.html_url;
returnData.runRerunUrl = run.rerun_url;
}

if (run.status === "completed" && run.conclusion === "success") {
console.log(`Found successful build for branch ${branchName}`);
returnData.lastSuccessfulRunNumber = run.run_number;
returnData.lastSuccessfulRunAttempt = run.run_attempt;
returnData.lastSuccessfulRunStatus = run.status;
returnData.lastSuccessfulRunConclusion = run.conclusion;
returnData.lastSuccessfulRunHtmlUrl = run.html_url;
returnData.lastSuccessfulRunRerunUrl = run.rerun_url;
returnData.lastSuccessfulWorkflowId = run.id;

matchingBuildFound = true;
break;
} else {
console.log(`Found build ${run.run_number} was status: ${run.status} conclusion:${run.conclusion}`);
}
}
}

if (!returnData.workflowId) {
console.log(`No build for branch ${branchName}`);
}

} catch (error) {
if (error.status === 404) {
console.log(`Cannot get build info for ${branchName}`);
} else {
throw error;
}
}
if (pageNumber >= maxPagesToCheck) {
console.log("Hit page limit maximum of", maxPagesToCheck);
matchingBuildFound = true;
}
pageNumber++;
}

console.log("Matching branch information: ");
console.log(returnData);

return returnData
} catch
(error) {
if (error.status === 404) {
//try next branch
console.log(`No branch ${branchName}`);
} else {
console.log(error)
throw (`Checking branch ${branchName} returned ${error.status}`);
}
}
}
}
}
}
}

0 comments on commit a2d76d8

Please sign in to comment.