From 92ebe08f286bdc752c1bd0089636b238db62fa2f Mon Sep 17 00:00:00 2001 From: lijia Date: Thu, 4 Nov 2021 17:06:34 +0800 Subject: TSG-8326, sapp CI增加加壳流程. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc9a42c..306ad2a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,8 @@ variables: stages: - build +- envelope +- upload - test sapp_module_test: @@ -135,4 +137,39 @@ release_build_release: paths: - build/*.rpm only: - - tags \ No newline at end of file + - tags + +envelope_rpm: + stage: envelope + variables: + FEATURE_ID: 100 + APP_NAME_IN_RPM_SPEC: sapp + script: + - export RPM_FULL_PATH=`ls $CI_PROJECT_DIR/build/*.rpm | grep -v debug | grep -v debuginfo | grep -v devel | head -n 1` + - export BIN_TO_PROTECT_IN_RPM="${INSTALL_PREFIX}/sapp" + - /root/rebuildrpm_and_envelope.sh $RPM_FULL_PATH $BIN_TO_PROTECT_IN_RPM $FEATURE_ID $APP_NAME_IN_RPM_SPEC + tags: + - envelope + artifacts: + name: "sapp-pr-$CI_COMMIT_REF_NAME-release" + paths: + - build/*-pr-*.rpm + only: + - tags + +upload_envelope_rpm: + stage: upload + variables: + PULP3_REPO_NAME: platform-stable-x86_64.el7 + PULP3_DIST_NAME: platform-stable-x86_64.el7 + script: + - cd $CI_PROJECT_DIR/build/ + - ls -ahl *.rpm + - cp ~/rpm_upload_tools.py ./ + - python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *-pr-*.rpm + - rm -rf *.rpm + tags: + - share + only: + - tags + -- cgit v1.2.3