jenkins-pipelines/scripts/publish-remote-cli.sh
Davlet Panech 1c1371cc5a Add step for building stx-remote-cli tarball
This step was missed when we created these scripts for Debian.

Story: 2010226
Task: 48670

Change-Id: I73f90b5a018fc32b39ab6d265acfbbb7fc275415
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-08-24 16:51:09 -04:00

28 lines
825 B
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2022 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
source $(dirname "$0")/lib/job_utils.sh
load_build_env
remote_cli_dir="$WORKSPACE_ROOT/std/build-remote-cli"
oidc_auth="$REPO_ROOT/cgcs-root/stx/oidc-auth-armada-app/oidc-auth-tools/oidcauthtools/oidcauthtools/oidc_auth.py"
dst_dir="$PUBLISH_DIR/outputs/remote-cli"
notice "publishing remote-cli to $dst_dir"
maybe_run mkdir -p "$dst_dir"
if [[ -d "$remote_cli_dir" ]] || $DRY_RUN ; then
maybe_run find "$remote_cli_dir" -mindepth 1 -maxdepth 1 -name '*.tgz' -exec \
cp -v -f --preserve=timestamps -t "$dst_dir" '{}' '+'
fi
if [[ -f "$oidc_auth" ]] || $DRY_RUN ; then
maybe_run cp -v -f --preserve=mode,timestamps "$oidc_auth" "$dst_dir/oidc-auth"
maybe_run chmod +x "$dst_dir/oidc-auth"
fi