ci

Travis CI testing branches with corresponding set of environment variables

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a project that I'm trying to automate tests using Travis CI. I have a dev branch and a test branch, and they have different environment variables. For example, on the dev branch, I need to connect to a different API than the test branch, specified by an environment variable. So, when I run the build on the dev branch on Travis, how do I set it up so that it only tests with the dev set of environment variables, and likewise for build on test branch? 回答1: There is no great way to do this right now, but you can write a shell script that

持续集成服务托管Travis CI入门

China☆狼群 提交于 2019-12-03 08:24:28
Travis CI 介绍 Travis CI是一个持续集成的托管服务。目前已经集成Github,并支持以下类型的项目: C C++ Clojure Erlang Go Groovy Haskell Java JavaScript (with Node.js) Objective-C Perl PHP Python Ruby Scala Travis CI构建环境为不同的语言提供多种不同的运行时,如多版本的Ruby,PHP,Node.js。同时,它还提供多种数据库和常用工具,如消息中间件。 你可以很轻松在一种或多种语言甚至多种数据库环境下测试你的项目。 第一步:登录: 首先使用你的Github帐户登录Travis CI。访问 Travis CI 并点击页面顶部的 Sign In 连接。 注意,在 http://travis-ci.org ,你只能看到你的公开仓库,而在 http://travis-ci.com ,你可以看你的私有仓库。 登录的时候,GitHub会询问是否允许我们访问你的GitHub权限。在 这里 有更详细的关于Github权限的描述。 第二步:激活GitHub的web钩子(Webhook) 登录后,我们将会从GitHub同步你的仓库,包括你的开源项目或私有项目。 你可以看到你所有的可访问的机构,仓库。只要你是仓库的管理员,你都可以开启服务钩子(service hook

P3918 [国家集训队]特技飞行

可紊 提交于 2019-12-03 08:17:08
题目背景 1.wqs爱好模拟飞行。 2.clj开了一家神犇航空,由于clj还要玩游戏,所以公司的事务由你来打理。 注意:题目中只是用了这样一个背景,并不与真实/模拟飞行相符 题目描述 神犇航空开展了一项载客特技飞行业务。每次飞行长N个单位时间,每个单位时间可以进行一项特技动作,可选的动作有K种,每种动作有一个刺激程度Ci。如果连续进行相同的动作,乘客会感到厌倦,所以定义某次动作的价值为(距上次该动作的时间)*Ci,若为第一次进行该动作,价值为0。安排一种方案,使得总价值最大。 输入格式 第一行,两个数,N和K,如上所述; 第二行,K个正整数,表示K种动作的Ci值。 输出格式 仅一行,一个整数,表示最大总价值。 输入输出样例 输入 #1 5 2 2 2 输出 #1 12 说明/提示 对于10%的测试数据,N<=20,K<=3 对于全部的测试数据,1<=N<=1000,1<=K<=300,0<=Ci<=1000。 思路 贪心,让 c大的动作相隔时间最长,尽可能地安排在两端,即可得到最优解 代码 #include<cmath> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N=1010; int c[N]; int n,k

Service Broker messages start to get hung up after about a day

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have an application that is using the Service Broker is SQL 2008. About once a day the database's performance starts take a noticeable hit and I have determined that this is because of the Service Broker. If I hard reset all broker connections using the following commands: ALTER DATABASE [ RegencyEnterprise ] SET OFFLINE WITH ROLLBACK IMMEDIATE ALTER DATABASE [ RegencyEnterprise ] SET ONLINE Then the performance returns to normal until about the next day. I have also noticed that when performance is poor, running the following

《CI/CD 流程以及原理说明》

廉价感情. 提交于 2019-12-03 04:51:50
自动化部署 CI/CD 是一种通过在应用开发阶段引入自动化来频繁向客户交付应用的方法。CI/CD 的核心概念是持续集成、持续交付和持续部署。作为一个面向开发和运营团队的解决方案,CI/CD 主要针对在集成新代码时所引发的问题(亦称:“集成地狱”)。 本 Chat 将从流程以及原理入手到实战演练,技术栈/关键词: Gitlab-CI Docker Maven Google Jib Nexus 适宜人群 微服务架构工程师 Java 开发人员 持续集成 Continuous Integration(CI)和持续交付 Continuous Delivery(CD)。在当前 DevOps 的趋势下,可以说具有支柱性地位。软件交付管道以快速、自动化和可重复的方式从源代码生成发布版本,就类似于工厂里的装配线以快速、自动化、可重复的方式从原材料生产出消费品,完成这项工作的总体设计我们就称之为持续交付,启动装配线的过程我们称之为持续集成。 在介绍 CI/CD 流水线的工作原理之前,我们先了解一下什么是 DevOps。 什么是 DevOps? DevOps 是一种软件开发方法。它将持续开发、持续测试、持续集成、持续部署和持续监控贯穿于软件开发的整个生命周期。当前几乎所有的顶尖公司均采用了该方法,用以提高软件开发质量,并缩短软件开发生命周期。从而以达到每个公司对软件产品的期望,交付出客户最满意的产品。

Continuous Integration

人盡茶涼 提交于 2019-12-03 03:47:43
-- 几个月前的学习笔记,懒得再翻译回来了 Continuous Integration Continuous Integration Purpose & Main Goals Enviroment Infomation Configuring Env Path Installing JDK 1.8 Install Nexus Configuring iptables Verify Nexus service by setting up a Maven project Install Maven on server side (later will be used by Jenkins) Install GitLab Enable SSH connection using GitLab without password Install Jenkins Setup automated build in Jenkins with Gitlab’s Web Hook feature Setup automated deploy after build in Jenkins Install Git server(Optional) Purpose & Main Goals Automatically build Expose problems earlier. Common module

GitLab CI runner can&#039;t connect to unix:///var/run/docker.sock in kubernetes

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: GitLab's running in kubernetes cluster. Runner can't build docker image with build artifacts. I've already tried several approaches to fix this, but no luck. Here are some configs snippets: .gitlab-ci.yml image: docker:latest services: - docker:dind variables: DOCKER_DRIVER: overlay stages: - build - package - deploy maven-build: image: maven:3-jdk-8 stage: build script: "mvn package -B --settings settings.xml" artifacts: paths: - target/*.jar docker-build: stage: package script: - docker build -t gitlab.my.com/group/app . - docker login -u

How to get list of all countries and cities in rails?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a country and city gem where user will be able to select a country and based on selected country he will select a city? I get multiple solution but they all support states not cities gem 'country_select' gem 'countries' gem 'carmen-rails' I want a list of all countries on dropdown and when I select any country then all cities of country will appear in cities dropdown. Is this possible through any gem? 回答1: Use the aptly named city-state gem . As seen by the README, you can do: CS.cities(state, country) If you want all cities in a

How to access CodeIgniter user defined models?

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I want to access a function of a user defined model in CodeIgniter inside a custom user defined library it throws Call to a member function Set_where() on a non-object Although I load the model by using this inside that library $CI =& get_instance(); $CI->load->model('home_model'); And I'm using this code to access the function inside home_model class $CI->home_model->Set_where("film_feature='Y'"); So now it throws the above error. So could someone please help me solve this error? 回答1: You could try to instantiate your model object like

mysql: error code [1267]; Illegal mix of collations (latin1_general_cs,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation &#039;=&#039;

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to make the password column of my User table to be case sensitive in mysql. Following is the description of the table: /*Table: mst_user*/ FIELD TYPE COLLATION ------------- ------------ ----------------- user_id VARCHAR(100) latin1_swedish_ci first_name VARCHAR(25) latin1_swedish_ci last_name VARCHAR(25) latin1_swedish_ci USER_PASSWORD VARCHAR(50) latin1_swedish_ci user_status INT(11) (NULL) version_id INT(11) (NULL) active_status INT(11) (NULL) user_type INT(11) (NULL) To make the USER_PASSWORD field case sensitive I executed