首页 > 系统相关 >一个写得很好的gitlab.yml模板(有Windows和Ubuntu)

一个写得很好的gitlab.yml模板(有Windows和Ubuntu)

时间:2023-01-12 09:55:59浏览次数:74  
标签:Windows gitlab REPO BUILD Ubuntu build stage DIR privkey

出自这个GitHub:https://github.com/nanoporetech/scrappie/blob/master/.gitlab-ci.yml

#  Yaml CI config for Gitlab See. http://docs.gitlab.com/ce/ci/yaml/README.html
#  Machine image on which to build, test etc
image: ${IMAGE_HOST}/algorithm/scrappie_docker:14.04-latest

variables:
  REPO_DEVELOPMENT: "trusty-unstable"
  REPO_STAGING:     "trusty-testing"
  REPO_PRODUCTION:  "trusty-stable"
  CI_VERSION_PATCH: $CI_BUILD_ID
  BUILD_DIR:        "build"

stages:
  - build
  - test
  - publish


building:
  stage: build
  script:
      - mkdir ${BUILD_DIR} && (cd ${BUILD_DIR} && cmake .. && make && make package)
  except:
      #  Don't test tags (just branches)
      #- tags
  artifacts:
    paths:
      - ${BUILD_DIR}/*.deb
      - ${BUILD_DIR}/scrappie
      - ${BUILD_DIR}/scrappie_unittest
      - ${BUILD_DIR}/libscrappie.so
      - ${BUILD_DIR}/libscrappie.a
      - ${BUILD_DIR}/Makefile
      - ${BUILD_DIR}/CTestTestfile.cmake
      - ${BUILD_DIR}/CMakeFiles/scrappie_test.dir/


build-manylinux:
    stage: build
    image: docker-registry.oxfordnanolabs.local:5000/ont-base-docker
    script:
        - docker run --rm -v `pwd`:/io ontresearch/manylinux1_x86_64_openblas /io/python/build-wheels.sh
    artifacts:
        paths:
          - python/wheelhouse/scrappie*.whl


testing:
  stage: test
  script:
      - cd ${BUILD_DIR} && make test
  artifacts:
    when: always
    paths:
      - ${BUILD_DIR}/Testing


upload-development:
  stage: publish
  script:
    - echo "$SSH_PRIVATE_KEY" > .privkey
    - chmod 600 .privkey
    - scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
  variables:
    REPO: $REPO_DEVELOPMENT
  only:
    - dev


upload-staging:
  stage: publish
  script:
    - echo "$SSH_PRIVATE_KEY" > .privkey
    - chmod 600 .privkey
    - scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
  variables:
    REPO: $REPO_STAGING
  only:
    - master


upload-prod:
  stage: publish
  script:
    - echo "$SSH_PRIVATE_KEY" > .privkey
    - chmod 600 .privkey
    - scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
  variables:
    REPO: $REPO_PRODUCTION
  only:
    - /^release-\d+\.\d+(?:.\d+)?(?:-\d+)?$/ # use regexp

标签:Windows,gitlab,REPO,BUILD,Ubuntu,build,stage,DIR,privkey
From: https://www.cnblogs.com/huangshiyi/p/17045583.html

相关文章

  • MongoDB分片副本集生产环境部署-Windows版本
    title:MongoDB分片副本集生产环境部署(Windows版本)date:2022-10-2917:21:11tags:-运维系统架构配置环境系统都是windows10专业版,使用VMWare安装作为实验环......
  • Ubuntu设置UFW (防火墙)
    开启关闭防火墙sudoufwenable#开启防火墙sudoufwdisable#关闭防火墙查看防火墙状态sudoufwstatus开启防火墙端口/服务1.开发端口sudoufwallow33......
  • Windows下如何查看某个端口被谁占用
    1、打开命令窗口(以管理员身份运行)开始—->运行—->cmd,或者是 window+R 组合键,调出命令窗口   2、查找所有运行的端口并进行筛选在列表中我们观察被占用的端......
  • 【table master mmocr】Windows下模型训练的配置
    processed_data就是mmocr_pubtabnet_recognition,注意统一命名由图可以看出,那个processed_data就是mmocr_pubtabnet_recognition,而且后面后缀_0927之类的都是日期,可能是......
  • 双系统开机直接进入ubuntu界面,搜索不到Windows启动项
    原因为止,确定是由ubuntu更新导致的结果解决方法执行命令sudorm/etc/grub.d/20_memtest86+删掉文件输入命令sudovim/etc/default/grub修改此配置文件,加入GRUB_DISAB......
  • ubuntu启动失败
    开机失败界面失败原因自动挂载失败,/etc/fstab下没搜到相应设备解决方法输入journalctl-xb查看日志根据日志查看是/etc/fstab下哪个硬盘出现了问题初步修复注释掉/......
  • Windows远程桌面不能最大化窗口
    远程桌面不能最大化窗口的解决方法......
  • nginx for windows
    nginx.confworker_processes8;error_loglogs/info;events{worker_connections2048;}http{includemime.types;default_typeapplica......
  • package:webview_windows 使用注意
    await_webViewController.loadUrl("F:/language/hbuilderx/code/test/test3.html");await_webViewController.loadUrl("file:///F:/language/hbuilderx/code/test/test3......
  • 在Windows上访问linux的共享文件夹
    1、https://blog.csdn.net/weixin_44147924/article/details/123692155   ......