Skip to content
代码片段 群组 项目
未验证 提交 aea7b581 编辑于 作者: Fernando Morales's avatar Fernando Morales 提交者: GitHub
浏览文件

[Github Actions] - Start Snapshot Build (#24230)


* Create start_snapshot_build.yml

* Update start_snapshot_build.yml

* Update start_snapshot_build.yml

* Update start_snapshot_build.yml

* Update CI.md

Co-authored-by: default avatarDanny McCormick <dannymccormick@google.com>
上级 944c7b61
No related branches found
No related tags found
无相关合并请求
# 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.
# This workflow will update apache beam master branch with next release version
# and cut release branch for current development version.
# To learn more about GitHub Actions in Apache Beam check the CI.md
# This workflow will create an empty PR and start gradle publish job.
name: Start Snapshot Build
on:
workflow_dispatch:
inputs:
USER_REMOTE_URL:
description: Your beam repo URL
required: true
default: https://github.com/apache/beam.git
jobs:
start_snapshot_build:
runs-on: [self-hosted, ubuntu-20.04]
env:
REMOTE_NAME: remote_repo
REMOTE_URL: ${{ github.event.inputs.USER_REMOTE_URL }}
BRANCH_NAME: snapshot_build
steps:
- name: Install Hub
run: |
cd ~
wget https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
tar zvxvf hub-linux-amd64-2.14.2.tgz
sudo ./hub-linux-amd64-2.14.2/install
echo "eval "$(hub alias -s)"" >> ~/.bashrc
- uses: actions/checkout@v3
- name: Set git config
run: |
git config user.name $GITHUB_ACTOR
git config user.email actions@"$RUNNER_NAME".local
- name: Create Snapshot Branch
run: |
git remote add ${REMOTE_NAME} ${REMOTE_URL}
git checkout -b ${BRANCH_NAME}
touch empty_file.txt
git add -A
git commit -m "Add empty file in order to create PR"
git push -f ${REMOTE_NAME}
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
hub pull-request -F- <<<"[DO NOT MERGE]Start snapshot build for release process
Run Gradle Publish"
echo "NOTE: If there is no jenkins job started, please comment generated PR with: Run Gradle Publish"
echo "Things remained you need to do manually after build successful:"
echo "1. Close this generated PR in github website."
echo "2. Delete your remote branch ${BRANCH_NAME} form your beam repo in github website."
\ No newline at end of file
......@@ -127,6 +127,11 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog
### Release Preparation and Validation Workflows
#### Start Snapshot Build - [start_snapshot_build.yml](.github/workflows/start_snapshot_build.yml)
| Job | Description | Pull Request Run | Direct Push/Merge Run | Scheduled Run | Requires GCP Credentials |
|-----------------------|-------------------------------------------------------------------------|------------------|-----------------------|---------------|--------------------------|
| Start Snapshot Build | Creates PR against apache:master and triggers a job to build a snapshot | No | No | No | No |
#### Choose RC Commit - [choose_rc_commit.yml](.github/workflows/choose_rc_commit.yml)
| Job | Description | Pull Request Run | Direct Push/Merge Run | Scheduled Run | Requires GCP Credentials |
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册