You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "rshamunov (via GitHub)" <gi...@apache.org> on 2023/02/13 14:59:23 UTC

[GitHub] [beam] rshamunov commented on a diff in pull request #25117: Playground ci webhook

rshamunov commented on code in PR #25117:
URL: https://github.com/apache/beam/pull/25117#discussion_r1104590098


##########
playground/infrastructure/cloudbuild/examples_ci.sh:
##########
@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+
+# 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.
+
+# Added set -x to show output into cloud build console to the bucket
+set -x
+
+export GRADLE_VERSION=7.5.1
+export GO_VERSION=1.18
+
+#Install python java8 and dependencies
+apt-get update > /dev/null
+apt update > /dev/null
+export DEBIAN_FRONTEND=noninteractive
+
+# Env configuration commands
+apt-get install -y apt-transport-https ca-certificates software-properties-common curl unzip apt-utils > /dev/null
+add-apt-repository -y ppa:deadsnakes/ppa > /dev/null && apt update > /dev/null
+apt install -y python3.8 python3.8-distutils python3-pip > /dev/null
+apt install --reinstall python3.8-distutils > /dev/null
+pip install --upgrade google-api-python-client > /dev/null
+python3.8 -m pip install pip --upgrade > /dev/null
+ln -s /usr/bin/python3.8 /usr/bin/python > /dev/null
+apt install python3.8-venv > /dev/null
+pip install -r playground/infrastructure/requirements.txt > /dev/null
+
+# Install jdk and gradle
+apt-get install openjdk-8-jdk -y > /dev/null
+curl -L https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -o gradle-${GRADLE_VERSION}-bin.zip > /dev/null
+unzip gradle-${GRADLE_VERSION}-bin.zip > /dev/null
+export PATH=$PATH:gradle-${GRADLE_VERSION}/bin > /dev/null
+
+# Install go
+curl -OL https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz > /dev/null
+tar -C /usr/local -xvf go$GO_VERSION.linux-amd64.tar.gz > /dev/null
+export PATH=$PATH:/usr/local/go/bin > /dev/null
+
+# Install Docker
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - > /dev/null
+add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" > /dev/null
+apt update > /dev/null && apt install -y docker-ce > /dev/null
+
+# Assigning required values for CI_CD.py script
+export \
+ORIGIN=PG_EXAMPLES \
+STEP=CI \
+SUBDIRS="./learning/katas ./examples ./sdks" \
+GOOGLE_CLOUD_PROJECT=${PROJECT_ID} \
+BEAM_ROOT_DIR="../.." \
+SDK_CONFIG="../sdks.yaml" \
+BEAM_EXAMPLE_CATEGORIES="../categories.yaml" \
+BEAM_CONCURRENCY=4 \
+BEAM_VERSION=2.43.0 \

Review Comment:
   Replace to an optional parameter for a script with default value "2.43.0". So we don't need to modify the script to update to higher version



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org