This is an automated email from the ASF dual-hosted git repository.
timbrown pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git
The following commit(s) were added to refs/heads/main by this push:
new c1e97aa1 Remove azure ci
c1e97aa1 is described below
commit c1e97aa1c9694236e6be29927e7bf322d1f4eb08
Author: daragu <[email protected]>
AuthorDate: Thu Jul 4 09:43:47 2024 +0800
Remove azure ci
---
.azure-pipelines/workflows/compile-and-test.yml | 37 -----------
.azure-pipelines/workflows/maven.yml | 32 ---------
.github/workflows/azure_ci.js | 85 ------------------------
.github/workflows/azure_ci_check.yml | 79 -----------------------
ci.md | 86 -------------------------
5 files changed, 319 deletions(-)
diff --git a/.azure-pipelines/workflows/compile-and-test.yml
b/.azure-pipelines/workflows/compile-and-test.yml
deleted file mode 100644
index 0df997d4..00000000
--- a/.azure-pipelines/workflows/compile-and-test.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-steps:
- - task: Cache@2
- inputs:
- key: 'maven | "$(Agent.OS)" | **/pom.xml'
- restoreKeys: |
- maven | "$(Agent.OS)"
- maven
- path: $(MAVEN_CACHE_FOLDER)
- displayName: Cache Maven local repo
- - task: Maven@4
- inputs:
- mavenPomFile: 'pom.xml'
- options: $(MAVEN_OPTS)
- mavenOptions: '-Xmx4096m'
- javaHomeOption: 'path'
- jdkDirectory: '/usr/lib/jvm/java-11-openjdk-amd64'
- jdkVersionOption: '1.11'
- jdkArchitectureOption: 'x64'
- publishJUnitResults: true
- testResultsFiles: '**/surefire-reports/TEST-*.xml'
- goals: 'install'
diff --git a/.azure-pipelines/workflows/maven.yml
b/.azure-pipelines/workflows/maven.yml
deleted file mode 100644
index 5fadb271..00000000
--- a/.azure-pipelines/workflows/maven.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-trigger:
- branches:
- include:
- - '*' # must quote since "*" is a YAML reserved character; we want a
string
-
-variables:
- MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
- MAVEN_OPTS: '-ntp -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
-
-stages:
-- stage: build
- jobs:
- - job: Linux
- pool: vmssagentspool
- steps:
- - template: compile-and-test.yml
diff --git a/.github/workflows/azure_ci.js b/.github/workflows/azure_ci.js
deleted file mode 100644
index 93121237..00000000
--- a/.github/workflows/azure_ci.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-async function checkAzureCiAndCreateCommitStatus({ github, context, prNumber,
latestCommitHash }) {
- console.log(`- Checking Azure CI status of PR: ${prNumber}
${latestCommitHash}`);
- const botUsername = 'xtable-bot';
-
- const comments = await github.paginate(github.rest.issues.listComments, {
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: prNumber,
- sort: 'updated',
- direction: 'desc',
- per_page: 100
- });
-
- // Find the latest comment from xtable-bot containing the Azure CI report
- const botComments = comments.filter(comment => comment.user.login ===
botUsername);
-
- let status = 'pending';
- let message = 'In progress';
- let azureRunLink = '';
-
- if (botComments.length > 0) {
- const lastComment = botComments[0];
- const reportPrefix = `${latestCommitHash} Azure: `
- const successReportString = `${reportPrefix}[SUCCESS]`
- const failureReportString = `${reportPrefix}[FAILURE]`
-
- if (lastComment.body.includes(reportPrefix)) {
- if (lastComment.body.includes(successReportString)) {
- message = 'Successful on the latest commit';
- status = 'success';
- } else if (lastComment.body.includes(failureReportString)) {
- message = 'Failed on the latest commit';
- status = 'failure';
- }
- }
-
- const linkRegex = /\[[a-zA-Z]+\]\((https?:\/\/[^\s]+)\)/;
- const parts = lastComment.body.split(reportPrefix);
- const secondPart = parts.length > 1 ? parts[1] : '';
- const match = secondPart.match(linkRegex);
-
- if (match) {
- azureRunLink = match[1];
- }
- }
-
- console.log(`Status: ${status}`);
- console.log(`Azure Run Link: ${azureRunLink}`);
- console.log(`${message}`);
-
- console.log(`- Create commit status of PR based on Azure CI status:
${prNumber} ${latestCommitHash}`);
- // Create or update the commit status for Azure CI
- await github.rest.repos.createCommitStatus({
- owner: context.repo.owner,
- repo: context.repo.repo,
- sha: latestCommitHash,
- state: status,
- target_url: azureRunLink,
- description: message,
- context: 'Azure CI'
- });
-
- return { status, message, azureRunLink };
-}
-
-module.exports = checkAzureCiAndCreateCommitStatus;
\ No newline at end of file
diff --git a/.github/workflows/azure_ci_check.yml
b/.github/workflows/azure_ci_check.yml
deleted file mode 100644
index e21509b4..00000000
--- a/.github/workflows/azure_ci_check.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-name: Azure CI
-
-on:
- issue_comment:
- types: [ created, edited, deleted ]
-
-permissions:
- statuses: write
- pull-requests: read
- issues: read
-
-jobs:
- check-azure-ci-and-add-commit-status:
- if: |
- github.event.issue.pull_request != null &&
- github.event.comment.user.login == 'xtable-bot'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Check PR state
- id: check_pr_state
- uses: actions/github-script@v7
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const issueNumber = context.issue.number;
- const { data: pullRequest } = await github.rest.pulls.get({
- owner: context.repo.owner,
- repo: context.repo.repo,
- pull_number: issueNumber
- });
-
- // Only check open PRs and a PR that is not a HOTFIX
- const shouldSkip = (pullRequest.body.includes('HOTFIX: SKIP AZURE
CI')
- || pullRequest.state != 'open');
-
- if (!shouldSkip) {
- const commitHash = pullRequest.head.sha;
- console.log(`Latest commit hash: ${commitHash}`);
- // Set the output variable to be used in subsequent step
- core.setOutput("latest_commit_hash", commitHash);
- }
- console.log(`Should skip Azure CI? ${shouldSkip}`);
- return shouldSkip;
-
- - name: Check Azure CI report and create commit status to PR
- if: steps.check_pr_state.outputs.result != 'true'
- uses: actions/github-script@v7
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const latestCommitHash = '${{
steps.check_pr_state.outputs.latest_commit_hash }}'
- const issueNumber = context.issue.number;
- const checkAzureCiAndCreateCommitStatus =
require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/azure_ci.js`);
-
- await checkAzureCiAndCreateCommitStatus({
- github,
- context,
- prNumber: issueNumber,
- latestCommitHash: latestCommitHash
- });
\ No newline at end of file
diff --git a/ci.md b/ci.md
deleted file mode 100644
index 03bf6431..00000000
--- a/ci.md
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing, software
- - distributed under the License is distributed on an "AS IS" BASIS,
- - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- - See the License for the specific language governing permissions and
- - limitations under the License.
--->
-
-# Guide on CI infrastructure
-
-## Context
-Apache XTable (incubating) uses Azure DevOps and Azure infrastructure for its
CI, providing more flexibility by not being constrained to the Apache org's
shared quota for CI.
-This approach is similar to those adopted by Apache Flink and Apache Hudi
communities.
-
-## Overview
-We have created [apachextable-ci](https://github.com/apachextable-ci) to
manage all CI-related repositories:
-
-- [xtable-mirror](https://github.com/apachextable-ci/xtable-mirror): This
repository mirrors the official repository (apache/incubator-xtable) to build
commits merged into master and release-* branches.
-- [xtable-branch-ci](https://github.com/apachextable-ci/xtable-branch-ci):
This repository is dedicated to building branches created PRs. Its main branch
remains at the commit of the branch's creation and does not require
synchronization with the official repository.
-
-The diagram below gives an overview of the infrastructure.
-
-!TODO
-
-
-## Azure VM
-We are running a B1s VM instance in this [Azure XTable account]().
-
-### Bootstrap Steps
-
-```sh
-sudo apt update -y
-sudo apt install -y git cron openjdk-8-jdk maven
-git clone [email protected]:apachextable-ci/git-repo-sync.git
-git clone [email protected]:apachextable-ci/ci-bot.git
-cd ci-bot
-mvn clean install
-```
-
-### Mirroring Master & Release Commits
-Use `crontab -e` to schedule the mirroring job, currently configured to mirror
`main` and release commits to the `apachextable-ci` repository.
-
-```sh
-*/10 * * * * $HOME/git-repo-sync/sync_repo.sh > /dev/null 2>&1
-```
-
-### Scanning PRs and Triggering Branch Builds
-Run `$HOME/git-repo-sync/run_cibot.sh` to start the CI branch builds in the
background.
-
-### Maintenance
-Manage the background process with `htop`.
-Typical maintenance steps include killing the process from `htop`, cleaning up
`~/ci-bot.log`, and re-running the script.
-
-Check the expiry date of Azure and GitHub tokens and update them accordingly.
They are used in `$HOME/git-repo-sync/run_cibot.sh`.
-
-### Potential Issues
-- Mirrored repositories (e.g., master, release-*) not being pushed, leading to
failure in mirrored CI execution.
- - Issues with `git fetch` or `push` in
`$HOME/git-repo-sync/sync_repo.sh`. Manually execute the git commands and
troubleshoot as needed.
-
-## Azure Pipelines
-There are two pipelines defined in this [Azure DevOps
project](https://dev.azure.com/apache-xtable-ci-org/apache-xtable-ci).
-
-- xtable-mirror: for master/release version builds
-- xtable-branch-ci: for PR builds
-
-For each `xtable-branch-ci` build, xtable-bot will post and update comments on
its corresponding PR as follows.
-
-!TODO
-
-PR reviewers should consider the results of this CI report as one of the
merging criteria.
-
-### Get Help
-- Azure DevOps docs:
- -
[Pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops).
- -
[Troubleshooting](https://docs.microsoft.com/en-us/azure/devops/pipelines/troubleshooting/troubleshooting?view=azure-devops).
-- For community support, raise questions on
[developercommunity.visualstudio.com](https://developercommunity.visualstudio.com/).