gitlab

Send Gitlab-CI artifacts via e-mail

眉间皱痕 提交于 2021-02-18 11:36:07
问题 Our Gitlab pipeline generates some performance graphs, which I would like to be sent to every team member via e-mail. So far, they are marked as artifacts so Gitlab keeps them. Is there any way within Gitlab to achive this? Or should I do that within the job script? 回答1: There is no way currently to send artifacts via email from the gitlab interface. You will indeed have to send them from your job scripts. Gitlab can send an email after a pipeline is finished (see in Settings>Integrations

python 相对路径和绝对路径的区别

别等时光非礼了梦想. 提交于 2021-02-17 10:49:45
一, Python中获得当前目录和上级目录 获取当前文件的路径: from os import path d = path.dirname(__file__) #返回当前文件所在的目录 # __file__ 为当前文件, 若果在ide中运行此行会报错,可改为 #d = path.dirname('.') 获得某个路径的父级目录:( 强烈建议使用该方法!可以逐层获取到根目录的地址,例如D:/) parent_path = os.path.dirname(d) #获得d所在的目录,即d的父级目录 parent_path = os.path.dirname(parent_path) ##获得parent_path所在的目录即parent_path的父级目录 获得规范的绝对路径: abspath = path.abspath(d) #返回d所在目录规范的绝对路径 ​ 二,路径拼接 Python3 os.path.join()用法 功能描述:os.path.join()函数用于路径拼接文件路径。 语法:os.path.join(path1 [,path2 [,...]]) os.path.join()函数中可以传入多个路径: 1.会从第一个以“/”开头的参数开始拼接,之前的参数全部丢弃。 2.优先判定上一种情况。若无,则如果出现“./”开头的参数,会从“./”开头的参数的上一个参数开始拼接。

generating version tags using semantic-release without the v

对着背影说爱祢 提交于 2021-02-17 05:11:55
问题 How can I use git tags with the format major . minor . patch , without the " v " in the beginning (i.e. versions 1.0.1, 2.0.1)? I'm using Gitlab CI, but even using the Docker image locally I'm not able to pass the value to tag-format correctly. What I'm trying to do: npx --no-install semantic-release --tag-format "\${version}" The error log: [8:42:06 PM] [semantic-release] › ✖ ETAGNOVERSION Invalid tagFormat option. The tagFormat (https://github.com/semantic-release/semantic-release/blob

Can i push into two remote repository in the same command line?

谁说胖子不能爱 提交于 2021-02-17 05:06:14
问题 I want to push and syncronize my code in two different remote repository, to Gitlab and Github at the same command, is it possible? 回答1: Let's me recommend this push-to-all-remotes alias: git config [--global] alias.push-to-all-remotes '!git remote | xargs -I% -n1 git push %' Usage: git push-to-all-remotes master . Taken from gitalias.com (full disclosure: I'm a contributor there). 回答2: Yes. Just define two remotes for your working copy: git remote add lab https://gitlab.com/... git remote

Can i push into two remote repository in the same command line?

坚强是说给别人听的谎言 提交于 2021-02-17 05:02:19
问题 I want to push and syncronize my code in two different remote repository, to Gitlab and Github at the same command, is it possible? 回答1: Let's me recommend this push-to-all-remotes alias: git config [--global] alias.push-to-all-remotes '!git remote | xargs -I% -n1 git push %' Usage: git push-to-all-remotes master . Taken from gitalias.com (full disclosure: I'm a contributor there). 回答2: Yes. Just define two remotes for your working copy: git remote add lab https://gitlab.com/... git remote

git笔记十:本地仓库同步到gitlab

只愿长相守 提交于 2021-02-15 06:01:22
本地仓库同步到gitlab 帮助文档 git remote --help 操作场景: 本地创建git仓库(含有readme.md文件), commit了三次 gitlab网站创建了一个项目 添加了readme.md 文件 再本地添加 远程关联 push到gitlab 1:添加远程分支的关联 git remote add gitlab git@git.demo123.com:dotnet/basics/gitstudy.git 2: 拉取到本地来吧 git fetch gitlab 因为本地和远程的readme.md 文件没有做合并, 我们现在来 merge一下 soaeon@DESKTOP-FUJJTHR MINGW64 /f/gitstudy (master) $ git merge gitlab/master fatal: refusing to merge unrelated histories 将两个不相干的文件 merge一下 soaeon@DESKTOP-FUJJTHR MINGW64 /f/gitstudy (master) $ git merge --allow-unrelated-histories gitlab/master 结果如下: Merge remote-tracking branch 'gitlab/master' # Please enter a

我在拼夕夕的这三年

自闭症网瘾萝莉.ら 提交于 2021-02-13 10:31:39
转载自:leadroyal https://www.leadroyal.cn/?p=1228#more-1228 background 首发于浙江大学cc98论坛和个人博客,如果转载请联系cc98官方或者联系本人,字数1w+,阅读时间约为10分钟。 2021年01月13日12:00,由于个人博客挂掉了,放置于 github。 本文目的是【希望学弟学妹们千万不要去拼多多】,从一个底层员工的视角,记录一下拼多多这家公司三年以来的整体变化,本文不涉及技术机密,只讨论行政制度、文化氛围、办公体验等,记录个人主观意愿,离职后于家中编写,记录一下经历,存在主观印象,部分内容已做马赛克处理。 表明身份1,没必要匿名了,根据拼多多的能力,稍微匹配一下时间段,想找到谁发帖非常容易。 表明身份2,楼主2013年入学2017年毕业,曾在cc98非常活跃,毕业后渐渐远离。2018年6月18日社招入职拼多多,工作2.5年,特地R回来cc98讲讲关于拼多多这三年的变化,总结一下,就是越来越差,希望学弟学妹们千万不要去。另外本人已离职,未收到离职证明和全年的加班费,HR承诺4-7天内寄出,本周三是第八天,如果还没有收到离职证明或者快递单号的话,楼主会来更新《如何不体面地从拼多多离职》,【2021年01月13日12:33:40,已收到离职证明一份。】离职比日常更刺激哦。 插曲,编写本文的过程中,1月11日

我是如何使用git把本地代码上传到github上的,值得借鉴

情到浓时终转凉″ 提交于 2021-02-13 09:54:36
背景:最近开发了一套招标系统, 我是如何用JSP在网络上架构一个网上招标系统,以推进网站无纸化,过程电子化,管理智能化的发展。 使用git进行上传。 首先自己得有git工具及github账号,自己没有的提前准备一下。我本地文件夹已经放了数据库及源代码,我直接在那个文件夹进行操作。 进去该文件夹。鼠标右键,打开git -> Git Bash Here -> git init。执行命令后目录下创建一个.git文件夹。 git init 查看状态 git status git add + 需要添加的文件名 或者git add --all 将所有的文件全部添加,我这里是 git add --all 这个命令会把当前路径下的所有文件,添加到待上传的文件列表中。 将add的文件commit到仓库,添加之后,最后提交就行,git commit -m “修改说明”。-m后面添加的是对本次操作的说明,加入你修改了代码或者重新上传了什么东西都做个简单说明,别人看了就知道是怎么回事了。然后再次git status查看状态,如下,已经添加成功: git commit -m "提交源代码" 去github上创建自己的Repository,点击Create repository,一步一步执行下去即可,创建成功后拿到创建的仓库的https地址 将本地的仓库关联到github上,我这里使用的是https

用Nginx代理请求,处理前后端跨域

女生的网名这么多〃 提交于 2021-02-12 04:56:11
  自从前端spa框架出现后,都是前后端分离开发了。我们在开发的时候难免会遇到跨域的问题。跨域这种问题解决的方法基本都是在服务端实现的。以java为例,我知道的有3种方法处理跨域:   1.使用 @CrossOrigin 注解对每一个接口进行跨域处理,缺点是比较麻烦 @CrossOrigin(origins ="*" ) @RequestMapping(value = "/test", method = RequestMethod.GET) public String test() { return "test" ; }   2.使用 @CrossOrigin 在入口类对所有接口进行跨域处理 @CrossOrigin(origins = "*" ) @RestController @SpringBootApplication public class SpringBootCorsTestApplication { // *** }   3.还可以添加一个配置类,对所有的接口进行跨域处理 @Configuration public class WebMvcConfig extends WebMvcConfigurerAdapter { @Override public void addCorsMappings(CorsRegistry registry) { registry