美文网首页
gitlab配合 七牛cli工具 qupload 使用

gitlab配合 七牛cli工具 qupload 使用

作者: Welman | 来源:发表于2018-11-22 16:26 被阅读27次

    git remote remove origin
    git remote add origin git@git.gitee.cn:feigo/fplatform.git
    git branch --set-upstream master origin/master
    git pull origin master --allow-unrelated-histories

    远程复制备份文件
    scp root@11xx:/var/opt/gitlab/backups/1526377180_2018_05_15_10.6.0_gitlab_backup.tar /var/opt/gitlab/backups/

    git remote remove origin
    git remote add origin git@git.gitee.cn:feigo/fstatistic.git
    gl
    git branch --set-upstream master origin/master
    git pull origin master 或 git pull origin master --allow-unrelated-histories

    安装gitlab
    持续集成
    安装gitlab-runner
    1、

    For Debian/Ubuntu

    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash

    For CentOS

    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash

    2、

    For Debian/Ubuntu

    sudo apt-get install gitlab-ci-multi-runner

    For CentOS

    sudo yum install gitlab-ci-multi-runner

    3、
    $ sudo gitlab-ci-multi-runner register

    Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com )
    http://git.gittt.cn/
    Please enter the gitlab-ci token for this runner
    tokenxxx-xxx-xxx
    Please enter the gitlab-ci description for this runner
    my-runner
    INFO[0034] fcf5c619 Registering runner... succeeded
    Please enter the executor: shell, docker, docker-ssh, ssh?
    shell
    Please enter the Docker image (eg. ruby:2.1):
    node:4.5.0
    INFO[0037] Runner registered successfully. Feel free to start it, but if it's
    running already the config should be automatically reloaded!

    4、配置可在/etc/gitlab-runner/config.toml 中修改

    配置.gitlab-ci.yml文件
    cache:
    key: ${CI_BUILD_REF_NAME}
    paths:

    release:
    script:
    - qshell account UNvLhAbSMs4RRxjEbleB5XGtOzeLTx54zRmcq_0D KhuaiYb5igSIE7PCSn4YE1nyedy8WAl1gzm-A_WF
    - qshell qupload 5 qupload.json
    only:
    - master
    stage: build
    tags:
    - server

    七牛的cli工具: qupload
    wget http://devtools.qiniu.com/qshell-v2.0.2.zip
    unzip qshell-v2.0.2.zip
    复制到/usr/local/bin下并改名为qshell
    命令
    1、qshell account ak apsw
    2、qshell qupload 5(并发数) qupload.json
    qupload.json
    {
    "src_dir" : "./",
    "bucket" : "feng",
    "key_prefix" : "cdn/",
    "overwrite" : true,
    "rescan_local" : true,
    "skip_path_prefixes" : "node_modules/,qupload.json",
    "skip_fixed_strings" : ".svn,.git,.gitignore,.gitlab-ci.yml,.vscode-upload.json",
    "skip_suffixes" : ".DS_Store,.exe,.log",
    "log_file" : "upload.log",
    "log_level" : "error",
    "log_rotate" : 1,
    "log_stdout" : true,
    "file_type" : 0
    }

    相关文章

      网友评论

          本文标题:gitlab配合 七牛cli工具 qupload 使用

          本文链接:https://www.haomeiwen.com/subject/jowlqqtx.html