YAML

yq processing a string with quotation marks

冷暖自知 提交于 2021-01-27 06:49:43
问题 Currently I am trying to exchange a string but WITH double quotes in a YAML file with the mikefarah/yq processor (version 3.1.2 on an Ubuntu machine) similar to the following: config: app: name: "string" So I tried to solve this classically for me first with: yq w -i appconfig.yml config.app.name "exchangedstring" But the quotation marks were not included in the string. config: app: name: exchangedstring I have made several attempts to escape the string to get the desired result, but

yq processing a string with quotation marks

戏子无情 提交于 2021-01-27 06:49:33
问题 Currently I am trying to exchange a string but WITH double quotes in a YAML file with the mikefarah/yq processor (version 3.1.2 on an Ubuntu machine) similar to the following: config: app: name: "string" So I tried to solve this classically for me first with: yq w -i appconfig.yml config.app.name "exchangedstring" But the quotation marks were not included in the string. config: app: name: exchangedstring I have made several attempts to escape the string to get the desired result, but

Polymorphic collections in SnakeYaml

我的未来我决定 提交于 2021-01-27 04:20:57
问题 My intention is to have polymorphic collections like the ones in JSON using jackson, maybe with the help of tags. I can't seem to able to configure it properly tho. My yaml file is: !person age: 27 job: dev name: me skills: - !devSkill { description: 'software development', name: android, language: java, c++ years: 7 } - !softSkill { description: 'good person', name: <3, reason: lots of NGO work } - !sportsSkill { description: 'racing legend', name: vrooom, championships: - San Marino 2012 -

Polymorphic collections in SnakeYaml

我只是一个虾纸丫 提交于 2021-01-27 04:16:33
问题 My intention is to have polymorphic collections like the ones in JSON using jackson, maybe with the help of tags. I can't seem to able to configure it properly tho. My yaml file is: !person age: 27 job: dev name: me skills: - !devSkill { description: 'software development', name: android, language: java, c++ years: 7 } - !softSkill { description: 'good person', name: <3, reason: lots of NGO work } - !sportsSkill { description: 'racing legend', name: vrooom, championships: - San Marino 2012 -

Using date as an ENV variable in GitHub action

南楼画角 提交于 2021-01-25 07:23:00
问题 This is very funny but very frustrating problem. I am using an ENV variable, which specifies date. I provide an ISO 8601 compliant version and in application, I retrieve it and parse. When I specify it in GH action workflow, it is get parsed as a date (rather than a string) and formatted. Therefore, my application parsing fails. Example: .github/workflows/rust.yaml env: MY_DATE: '2020-10-07T12:00:00+01:00' run: echo $MY_DATE Result (GH action UI): env: TMOU_GAME_END: 10/07/2020 11:00:00 10/07

Using date as an ENV variable in GitHub action

陌路散爱 提交于 2021-01-25 07:21:47
问题 This is very funny but very frustrating problem. I am using an ENV variable, which specifies date. I provide an ISO 8601 compliant version and in application, I retrieve it and parse. When I specify it in GH action workflow, it is get parsed as a date (rather than a string) and formatted. Therefore, my application parsing fails. Example: .github/workflows/rust.yaml env: MY_DATE: '2020-10-07T12:00:00+01:00' run: echo $MY_DATE Result (GH action UI): env: TMOU_GAME_END: 10/07/2020 11:00:00 10/07

Using date as an ENV variable in GitHub action

陌路散爱 提交于 2021-01-25 07:21:34
问题 This is very funny but very frustrating problem. I am using an ENV variable, which specifies date. I provide an ISO 8601 compliant version and in application, I retrieve it and parse. When I specify it in GH action workflow, it is get parsed as a date (rather than a string) and formatted. Therefore, my application parsing fails. Example: .github/workflows/rust.yaml env: MY_DATE: '2020-10-07T12:00:00+01:00' run: echo $MY_DATE Result (GH action UI): env: TMOU_GAME_END: 10/07/2020 11:00:00 10/07

Using date as an ENV variable in GitHub action

ⅰ亾dé卋堺 提交于 2021-01-25 07:20:58
问题 This is very funny but very frustrating problem. I am using an ENV variable, which specifies date. I provide an ISO 8601 compliant version and in application, I retrieve it and parse. When I specify it in GH action workflow, it is get parsed as a date (rather than a string) and formatted. Therefore, my application parsing fails. Example: .github/workflows/rust.yaml env: MY_DATE: '2020-10-07T12:00:00+01:00' run: echo $MY_DATE Result (GH action UI): env: TMOU_GAME_END: 10/07/2020 11:00:00 10/07

Hyperledger Fabric 环境搭建(2)

天大地大妈咪最大 提交于 2021-01-25 05:00:32
上一篇 https://www.cnblogs.com/xdyixia/p/11738096.html 介绍了Hyperledger Fabric环境中各种软件安装和源码编译,这一篇介绍快速运行一个简单的Fabric网络。 方法一:利用源码中的脚本运行docker镜像 在Fabric的源码中提供了一个基于docker-compose运行上篇文章中的Docker镜像文件的例子。 在$GOPATH/src/github.com/hyperledger/fabric/examples/ e2e_cli目录里运行脚本 ./network_setup.sh up 下面是运行该脚本启动Fabric的结果 View Code 这个做了以下操作: 1)编译生成Fabric公私钥、证书的程序,程序在目录:fabric/release/linux-amd64/ bin 2)基于configtx.yaml生成创世区块和通道相关信息,并保存在channel- artifacts文件夹。 3)基于crypto-config.yaml生成公私钥和证书信息,并保存在crypto- config文件夹中。 4)基于docker-compose-cli.yaml启动1Orderer+4Peer+ 1CLI的Fabric容器。 5)在CLI启动的时候,会运行scripts/script.sh文件

Auto update of requirements.yml in conda

旧城冷巷雨未停 提交于 2021-01-24 09:37:30
问题 We are using conda to manage the environment of our Python projects. One thing that bugs us is someone in the team occasionally installs a new package in the environment but forget to update the requirements.yml file. Instead of typing this before every commit: conda env export > requirements.yml Is there away to have that file automatically updated when someone install or remove a package? 回答1: Git Hooks I don't know of a hook for conda (install/upgrade/remove) . However, one could add a Git