From d9dc91bc98cab9d3ba4e2f520e2cf5a918c6f710 Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Wed, 20 Oct 2021 10:44:23 +0300 Subject: [PATCH] =?UTF-8?q?TSG-8097=20TFE=E7=9A=84CI=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E9=80=82=E9=85=8D=E5=8A=A0=E5=A3=B3=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ ci/travis.sh | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b17169..6d50724 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,8 @@ variables: stages: - build +- envelope +- upload .build_by_travis: before_script: @@ -109,3 +111,37 @@ release_build_release: - build/*.rpm only: - tags + +envelope_rpm: + stage: envelope + variables: + FEATURE_ID: 100 + APP_NAME_IN_RPM_SPEC: tfe + 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}/bin/tfe" + - /root/rebuildrpm_and_envelope.sh $RPM_FULL_PATH $BIN_TO_PROTECT_IN_RPM $FEATURE_ID $APP_NAME_IN_RPM_SPEC + tags: + - envelope + artifacts: + name: "tfe-pr-$CI_COMMIT_REF_NAME-release" + paths: + - build/*-pr-*.rpm + only: + - tags + +upload_envelope_rpm: + stage: upload + variables: + PULP3_REPO_NAME: tfe-stable-x86_64.el7 + PULP3_DIST_NAME: tfe-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 diff --git a/ci/travis.sh b/ci/travis.sh index 19470d9..7744474 100644 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -57,7 +57,7 @@ make make test if [ -n "${PACKAGE}" ]; then - make package + make package cp ~/rpm_upload_tools.py ./ python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm fi