Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/job-precommit-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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 run Typescript PreCommit.

name: Typescript

on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
push:
branches: ['master', 'release-*']
tags: 'v*'
pull_request_target:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['sdks/python/apache_beam/runners/interactive/extensions/**']
permissions: read-all

jobs:
typescript:
name: Typescript
runs-on: [self-hosted, ubuntu-20.04]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup-self-hosted-action
with:
requires-go-18: false
- name: Run :typescriptPreCommit
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :typescriptPreCommit
66 changes: 66 additions & 0 deletions .github/workflows/job-precommit-website-stage-gcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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 run the Website in Stage GCS.

name: Website Stage GCS

on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
push:
branches: ['master', 'release-*']
tags: 'v*'
pull_request_target:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['website/**']
permissions: read-all

jobs:
website-stage-gcs:
name: Run Website Stage in GCS
runs-on: [self-hosted, ubuntu-20.04]
steps:
- name: Checking out composite to setup service account
uses: actions/checkout@v3
with:
ref: master
- name: Setup service account
uses: ./.github/actions/activate-service-account
with:
GCP_SERVICE_ACCOUNT: ${{secrets.GCP_SELF_HOSTED_SA_KEY}}
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup-self-hosted-action
with:
requires-go-18: false
- name: Run :website:stageWebsite
uses: ./.github/actions/gradle-command-self-hosted-action
env: # TODO(https://github.com/apache/beam/issues/23580) Rename ghprb env vars to a more GHA concept.
ghprbPullId: ${{github.event.pull_request.number}}
ghprbPullAuthorLogin: ${{github.actor}}
ghprbSourceBranch: ${{github.ref_name}}
ghBranch: ${{github.head_ref}}
repositoryUrl: ${{github.repository}}
with:
gradle-command: :website:stageWebsite
61 changes: 61 additions & 0 deletions .github/workflows/job-precommit-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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 run Website PreCommit.

name: Website

on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
push:
branches: ['master', 'release-*']
tags: 'v*'
pull_request_target:
branches: ['master', 'release-*']
tags: 'v*'
paths: ['website/**']
permissions: read-all

jobs:
website:
name: website
runs-on: [self-hosted, ubuntu-20.04]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup environment
uses: ./.github/actions/setup-self-hosted-action
with:
requires-go-18: false
requires-py-37: false
requires-py-38: false
requires-py-39: false
- name: Run :websitePreCommit
uses: ./.github/actions/gradle-command-self-hosted-action
env: # TODO(https://github.com/apache/beam/issues/23580) Rename ghprb env vars to a more GHA concept.
ghprbPullId: ${{github.event.pull_request.number}}
ghprbPullAuthorLogin: ${{github.actor}}
ghprbSourceBranch: ${{github.ref_name}}
ghBranch: ${{github.head_ref}}
repositoryUrl: ${{github.repository}}
with:
gradle-command: :websitePreCommit
3 changes: 0 additions & 3 deletions .test-infra/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ Beam Jenkins overview page: [link](https://ci-beam.apache.org/)
| beam_PreCommit_Spotless | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Phrase/) | `Run Spotless PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Cron) |
| beam_PreCommit_SQL | [commit](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Phrase/) | `Run SQL PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Cron/) |
| beam_PreCommit_SQL_Java11 | [commit](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Phrase/) | `Run SQL_Java11 PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Cron/) |
| beam_PreCommit_Website | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Website_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Website_Phrase/) | `Run Website PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron) |
| beam_PreCommit_Website_Stage_GCS | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Website_Stage_GCS_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Website_Stage_GCS_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Website_Stage_GCS_Phrase/) | `Run Website_Stage_GCS PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Website_Stage_GCS_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Website_Stage_GCS_Cron) |
| beam_PreCommit_Whitespace | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Phrase/) | `Run Whitespace PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Cron) |
| beam_PreCommit_Typescript | [commit](https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Commit/), [cron](https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Cron/), [phrase](https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Phrase/) | `Run Typescript PreCommit` | [![Build Status](https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Cron/badge/icon)](https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Cron) |

### PostCommit Jobs

Expand Down
29 changes: 0 additions & 29 deletions .test-infra/jenkins/job_PreCommit_Typescript.groovy

This file was deleted.

27 changes: 0 additions & 27 deletions .test-infra/jenkins/job_PreCommit_Website.groovy

This file was deleted.

31 changes: 0 additions & 31 deletions .test-infra/jenkins/job_PreCommit_Website_Stage_GCS.groovy

This file was deleted.

8 changes: 5 additions & 3 deletions CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog

### PreCommit Workflows

| Workflow | Description | Requires GCP Credentials |
|----------------------------------------------------------------------------------|-------------------------|---------------------------|
| [job-precommit-placeholder.yml](.github/workflows/job-precommit-placeholder.yml) | Description placeholder | Yes/No |
| Workflow | Description | Requires GCP Credentials |
|----------------------------------------------------------------------------------------------|---------------------------|--------------------------|
| [job-precommit-typescript.yml](.github/workflows/job-precommit-typescript.yml) | Runs Typescript PreCommit | No |
| [job-precommit-website.yml](.github/workflows/job-precommit-website.yml) | Runs Website PreCommit | No |
| [job-precommit-website-stage-gcs.yml](.github/workflows/job-precommit-website-stage-gcs.yml) | Runs Website in Stage GCS | Yes |

### PostCommit Workflows

Expand Down
25 changes: 25 additions & 0 deletions website/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,29 @@ RUN HUGOHOME="$(mktemp -d)" \
&& chmod +x /usr/local/bin/hugo \
&& rm -r "${HUGOHOME}"


# Install gcloud
# Make sure that your operating system meets the requirements

# Add the gcloud CLI distribution URI as a package source
RUN apt-get install apt-transport-https ca-certificates gnupg
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud public key
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Update and install the gcloud CLI
RUN apt-get update && apt-get install google-cloud-cli
# #Installing and replacing default python version
RUN apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev \
&& curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz \
&& tar -xf Python-3.8.2.tar.xz \
&& cd Python-3.8.2 && ./configure --enable-optimizations \
&& make -j 4 && make altinstall

RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.8 1\
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2 \
&& update-alternatives --set python $(update-alternatives --list python | grep python3.8)

# Add dedicated user to have permissions on opt dir
RUN useradd -m actions && usermod -aG sudo actions && echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN chown -R actions:actions /opt/
WORKDIR /opt/
Loading