diff options
| author | liuxueli <[email protected]> | 2020-04-07 14:41:37 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2020-04-07 14:41:37 +0800 |
| commit | e90e25a48b25f40b3b6f6f78cb2e3320c69bf91e (patch) | |
| tree | 049f838d04f04a4a58a355c37d5fb729235b2138 /.gitlab-ci.yml | |
| parent | 9c9b8a993bb774d2c11e44799276cb6369b03e3a (diff) | |
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 121 |
1 files changed, 92 insertions, 29 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1b471d..a5b6ded 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,40 +1,103 @@ -image: "git.mesalab.cn:7443/mesa_framework/framework-build-env:master" +image: "git.mesalab.cn:7443/mesa_platform/build-env:master" +variables: + GIT_STRATEGY: "clone" + BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/ + INSTALL_PREFIX: "/opt/MESA/lib/" + stages: - build -#- test -#- package -- release -variables: - ARTIFACTS_JOB: "build" - -build: - stage: build +.build_by_travis: + before_script: + - mkdir -p $BUILD_PADDING_PREFIX/$CI_PROJECT_NAMESPACE/ + - ln -s $CI_PROJECT_DIR $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH + - cd $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH + - chmod +x ./ci/travis.sh script: - - mkdir -p build - - cd build - - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$BUILD_PREFIX - - make - - make package + - yum makecache + - ./ci/travis.sh + - cd build tags: - - share + - share + +branch_build_debug: + stage: build + extends: .build_by_travis variables: - BUILD_TYPE: "Debug" - BUILD_PREFIX: "/opt/MESA/" - only: + BUILD_TYPE: Debug + except: + - /^develop.*$/i + - /^master.*$/i + - tags + +branch_build_release: + stage: build + variables: + BUILD_TYPE: RelWithDebInfo + extends: .build_by_travis + except: + - /^develop.*$/i + - /^master.*$/i - tags - - pushes + +develop_build_debug: + stage: build + extends: .build_by_travis + variables: + BUILD_TYPE: Debug + PACKAGE: 1 artifacts: - name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-debug" + name: "MESA_field_stat2-$CI_COMMIT_REF_NAME-debug" paths: - - ./build/*.rpm - expire_in: "1 years" + - build/*.rpm + only: + - /^develop.*$/i + - /^master.*$/i -release: - stage: release - tags: - - share +develop_build_release: + stage: build + extends: .build_by_travis + variables: + BUILD_TYPE: RelWithDebInfo + PACKAGE: 1 + artifacts: + name: "MESA_field_stat2-$CI_COMMIT_REF_NAME-release" + paths: + - build/*.rpm only: - - tags - script: - - /bin/bash -x ./autorelease.sh $CI_API_V4_URL $CI_PROJECT_URL $CI_PROJECT_ID $CI_TOKEN $CI_COMMIT_TAG $ARTIFACTS_JOB $CI_PROJECT_NAME + - /^develop.*$/i + - /^master.*$/i + + +release_build_release: + stage: build + variables: + BUILD_TYPE: RelWithDebInfo + PACKAGE: 1 + UPLOAD: 1 + PULP3_REPO_NAME: framework-stable-x86_64.el7 + PULP3_DIST_NAME: framework-stable-x86_64.el7 + extends: .build_by_travis + artifacts: + name: "MESA_field_stat2-$CI_COMMIT_REF_NAME-release" + paths: + - build/*.rpm + only: + - tags + +release_build_release_devel: + stage: build + variables: + BUILD_TYPE: RelWithDebInfo + ENABLE_DEVEL_SWITCH: "ON" + PACKAGE: 1 + UPLOAD: 1 + PULP3_REPO_NAME: framework-stable-x86_64.el7 + PULP3_DIST_NAME: framework-stable-x86_64.el7 + extends: .build_by_travis + artifacts: + name: "MESA_field_stat2-$CI_COMMIT_REF_NAME-release" + paths: + - build/*.rpm + only: + - tags |
