From 36c21213a6e20d954093a1b902cd115c6e7a4afd Mon Sep 17 00:00:00 2001 From: Andrey Tsibin Date: Fri, 22 Sep 2023 13:06:41 +0300 Subject: [PATCH] Build client separately --- .github/workflows/main.yml | 20 ++++++++++++++- deploy/github_actions/gha_build_client.sh | 30 +++++++++++++++++++++++ deploy/github_actions/gha_pack_dist.sh | 22 +++++++++++------ 3 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 deploy/github_actions/gha_build_client.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a74b9c1cfc..2661a6c4a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,9 +88,27 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_DEFAULT_REGION }} - run: bash deploy/github_actions/gha_build_pipe_windows.sh + Build_Client: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '8' + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + architecture: 'x64' + - uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_DEFAULT_REGION }} + - run: bash deploy/github_actions/gha_build_client.sh Build_All: runs-on: ubuntu-20.04 - needs: [CLI_Linux, CLI_Linux_el6, CLI_MacOS, CLI_Windows] + needs: [CLI_Linux, CLI_Linux_el6, CLI_MacOS, CLI_Windows, Build_Client] steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 diff --git a/deploy/github_actions/gha_build_client.sh b/deploy/github_actions/gha_build_client.sh new file mode 100644 index 0000000000..3063d3520c --- /dev/null +++ b/deploy/github_actions/gha_build_client.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2017-2023 EPAM Systems, Inc. (https://www.epam.com/) +# +# Licensed 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. + +set -e + +CLOUD_PIPELINE_BUILD_NUMBER=$(($CLOUD_PIPELINE_BUILD_NUMBER_SEED+$GITHUB_RUN_NUMBER)) + +./gradlew -PbuildNumber=${CLOUD_PIPELINE_BUILD_NUMBER}.${GITHUB_SHA} \ + -Pprofile=release \ + client:buildUI \ + --no-daemon + +tar -czf $PWD/client.tar.gz -C client/build . + +if [ "$GITHUB_REPOSITORY" == "epam/cloud-pipeline" ]; then + aws s3 cp client.tar.gz s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/client.tar.gz +fi diff --git a/deploy/github_actions/gha_pack_dist.sh b/deploy/github_actions/gha_pack_dist.sh index c0fe648951..02c660a1ab 100644 --- a/deploy/github_actions/gha_pack_dist.sh +++ b/deploy/github_actions/gha_pack_dist.sh @@ -51,13 +51,20 @@ rm -rf ${API_STATIC_PATH}/* rm -rf build/install/dist/* mkdir -p ${API_STATIC_PATH} -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe ${API_STATIC_PATH}/pipe -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe.tar.gz ${API_STATIC_PATH}/pipe.tar.gz -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-el6 ${API_STATIC_PATH}/pipe-el6 -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-el6.tar.gz ${API_STATIC_PATH}/pipe-el6.tar.gz -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-osx ${API_STATIC_PATH}/pipe-osx -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-osx.tar.gz ${API_STATIC_PATH}/pipe-osx.tar.gz -aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe.zip ${API_STATIC_PATH}/pipe.zip +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe ${API_STATIC_PATH}/pipe +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe.tar.gz ${API_STATIC_PATH}/pipe.tar.gz + +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-el6 ${API_STATIC_PATH}/pipe-el6 +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-el6.tar.gz ${API_STATIC_PATH}/pipe-el6.tar.gz + +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-osx ${API_STATIC_PATH}/pipe-osx +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe-osx.tar.gz ${API_STATIC_PATH}/pipe-osx.tar.gz + +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe.zip ${API_STATIC_PATH}/pipe.zip + +aws s3 cp --quiet s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/client.tar.gz ${API_STATIC_PATH}/client.tar.gz +tar -xzf ${API_STATIC_PATH}/client.tar.gz -C ${API_STATIC_PATH} +rm -f ${API_STATIC_PATH}/client.tar.gz ./gradlew clean distTar -PbuildNumber=${CLOUD_PIPELINE_BUILD_NUMBER}.${GITHUB_SHA} \ -Pprofile=release \ @@ -66,6 +73,7 @@ aws s3 cp s3://cloud-pipeline-oss-builds/temp/$CLOUD_PIPELINE_BUILD_NUMBER/pipe. -x :pipe-cli:buildMac \ -x :pipe-cli:buildMacPy3 \ -x :pipe-cli:buildWin \ + -x :client:buildUI \ -Pfast \ --no-daemon