投稿時間:2022-07-16 21:15:55 RSSフィード2022-07-16 21:00 分まとめ(17件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 整数aが整数bの倍数かどうかの判定方法 https://qiita.com/niesrugni/items/4cb19cc4d2d54a33431b 方法 2022-07-16 20:16:46
Docker dockerタグが付けられた新着投稿 - Qiita CI/CD とは? https://qiita.com/wf-kenji-ikeda/items/bfb6d5e21b33d0cca83b 記載 2022-07-16 20:03:42
Ruby Railsタグが付けられた新着投稿 - Qiita options_from_collection_for_selectですでに選択されている値を呼び出す https://qiita.com/kkdmgs110/items/796646b349944515c08d formfor 2022-07-16 20:50:24
技術ブログ Developers.IO Aurora PostgreSQL をアップグレードした時の、Babelfish バージョンを確認してみた https://dev.classmethod.jp/articles/babelfish-major-version-up/ amazonaurorapostgresql 2022-07-16 11:51:17
海外TECH DEV Community New GitHub Achievements https://dev.to/krishnaagarwal/new-github-achievements-3lae New GitHub AchievementsSome more GitHub Achievements out there Check them out on my profile But one more badge remains stargazer so go star my repos and I ll see you there Also I am posting very useful repos so do follow me too MrKrishnaAgarwal Krishna Agarwal ·GitHub I m a Tech passionate who is in the chase of awesome projects and interesting tech concepts I wish to create an impact in the field of computer science MrKrishnaAgarwal github com 2022-07-16 11:55:21
海外TECH DEV Community 5 Things I wished I had known when I started to maintain GitLab CICD https://dev.to/snakepy/5-things-i-wished-i-had-known-when-i-started-to-maintain-gitlab-cicd-1e4i Things I wished I had known when I started to maintain GitLab CICDIn this post I describe a few of the amazing concepts of GitLab CICD pipelines They made my daily work on the CICD pipelines significantly easier All examples can be found here YAML AnchorsThis is probably for many of you a no brainer When I got into CICD I was also pretty new to work with YAML files I also did not start from scratch I had to deal with a huge CICD file which was over lines long I could shrink it down to a couple of hundreds line while also adding more functionality into the pipelines I could achive this utilizing the concept of parallelization and YAML Anchors What are YAML Anchors YAML Anchors are reusable code blocks you can easily insert at a later stage You can define entire jobs like this and based on some variables you set you can change the job I will make an example Let s say we have two builds in our pipeline to perform one for development and one for production But for production we need a different env file than for development We could then just create two jobs like this below which will result in this kind of pipeline stages   deploydev deploy  variables    ENV FILE env test stage deploy script    source ENV FILE   echo DEPLOY APPLICATION master deploy  variables    ENV FILE env prod stage deploy script    source ENV FILE   echo DEPLOY APPLICATION These two jobs are fairly easy to read but imagine a more complex build bundle script and also added different rules on when to run what jobs We can do better if we use YAML Anchors because most parts of the jobs are the same So we can transform the above code block to the following which will result in this kind of pipeline stages   deploy deploy amp deploy stage deploy before script    if ENV FILE then echo ENV FILE is not set exit fi script    source ENV FILE   echo BUILDING APPLICATION dev deploy   lt lt deploy variables   ENV FILE env teststaging deploy   lt lt deploymaster deploy   lt lt deploy variables   ENV FILE env prodAs you can see we now share the code of across the different jobs I also added a staging job into the mix to show that we can also prevent jobs from running if the required variables are not set for the job When it comes to override the stuff which comes at a later line will override the declarations of before That is why we spread the deploy anchor at the top of the job ParallelizationParallelization has similar use cases to YAML Anchors But is somewhat different Sometimes a job is exactly the same but just one variable is different and therefore it needs to be run again and again SO going back to the first example we could also improve on it in the following manner which results in this kind of pipeline stages   deploydev deploy  stage deploy parallel   matrix     ENV       test      prod script    echo ENV   echo env ENV   source env ENV   echo DEPLOY TO ENV So instead of define multiple jobs we define on job with a parallel matrix This will spin up the job multiple times and inject the ENV variable This is very useful if you for instance need to build or test your app based on different environments files because then only one CI Variable is different The downside is that you can only spin up parallel processes On the other hand parallel jobs are also often used to split up a big job into smaller parts and then bring everything together in the next job or you can split your test files into parallel jobs CI JOB TOKENThe CI JOB TOKEN is a pre set variable which allows you to access or trigger other resources within a group So if you need to trigger a multi project pipeline where for instance after the backend is deployed you want to trigger the frontend deployment the CI JOB TOKEN comes in very handy But there is more If you use the CI JOB TOKEN then GitLab will actually know and make a connection between these pipelines You can jump from one project s pipeline to another project s pipeline The call would look like this stages   trigger pipeline in other projecttrigger  stage trigger pipeline in other project script    curl request POST form token CI JOB TOKEN PROJECT ID gt trigger pipelineA resulting pipeline could look like this Clean Up JobsClean up jobs are jobs which run after another job and based on the pipeline status the execution changes So you can basically run a different job depending on the pipeline status For instance you can then clear the cache on failure or invalidate some CloudFront dist etc So to utilize this concept you can do something like the following which result in a pipeline like this stages   build  deploybuild  stage build script    echo BUILD APPLICATION deploy on failure  stage deploy when on failure script    echo CLEAR ARTIFACTS deploy on success  stage deploy when on success script    echo DEPLOY APPLICATION deploy on failure runs only if the build has failed while deploy on success will run when the build has succeeded This can come very handy but has limitations that is why I really like the next concept Child Pipelines amp Dynamic Child PipelinesChild Pipelines are pipelines which are started using the combination of the trigger and include keywords They are detached from the parent pipeline and start by default directly running when triggered So if one stage in your CICD file is trigger job for a child pipeline it will trigger the pipeline and then the next job will start immediately after Child pipelines are defined in a second CICD file which is included into the main file Let me make an example which would result in this kind of pipeline The main file would look like this stages   test  build  deploytest  stage test trigger   include test ymlbuild  stage build script    echo BUILD APPLICATION deploy  stage deploy script    echo DEPLOY APPLICATION AS you can see the test stage includes a second YAML file which will be triggered into the detached child pipeline The file could look like this stages   testtest  stage test script    echo TEST APPLICATION So child pipelines allow splitting your YAML files into multiple files But they also have a constraint and can only be triggered up to two levels down That means the first child pipeline can trigger another child pipeline but this pipeline cannot trigger a third child pipeline But why is this exciting we can use other tools for splitting YAML files This is exciting because the triggered YAML File does not have to exist before the pipeline starts The above statement leads us right into Dynamic Child Pipelines This concept is really powerful and deserves an article on its own Let me know if I should write more about it Most programming languages have some sort of packages to convert a JSON like structure into a YAML file So what you can do you have a pre job which will compute the YAML file for you and then passes the YAML file as an artifact to the trigger job This way you can decide on the fly what the child pipeline should look like What I am going to show is not the most elegant or dynamic way but it is the easiest way to grasp the concept I call this set up a pipeline switch Let s say we have a job which computes something for us Examples For instance gas prices for blockchains and if the grass prices are low we want to deploy the new contracts basically when deployment costs are low On every Sunday we want to deploy our frontend in a random color DYou get the gist so we have some condition on which we want to alter the pipeline The below example can resulting pipeline is then depending on the outcome of the condition the deployment fees stages   build  check deployment costs  trigger dynamic childbuild  stage build script    echo BUILD APPLICATION check deployment costs  stage check deployment costs script    echo RUNS SCRIPT TO CHECK DEPLOYMENT COSTS    echo query computed costs per contract are Finney    bash pipelineSwitch sh  artifacts   paths     dynamicChildPipeline yml trigger dynamic child  stage trigger dynamic child trigger   include     artifact dynamicChildPipeline yml    job check deployment costsSo in the step check deployment costs we check for the deployment costs and plug that into our bash script The bash script is a simple check and then copies from the template folder to the location from where we will upload the artifact echo input value if lt then  echo should deployment   cp CICDTemplates deployment yml dynamicChildPipeline ymlelse  echo should wait deployment   cp CICDTemplates sendNotification yml dynamicChildPipeline ymlfiThis solution might be as stated earlier not as elegant as other solutions but still pretty viable for a quick way The resulting pipelines look like this if the price is too high or if the price is okay LET ME KNOWDo you need help with anything written above What would be top on your list Do you think I can improve then let me knowDid you like the article 2022-07-16 11:20:20
Apple AppleInsider - Frontpage News Apple challenges injunction against self-preferencing services https://appleinsider.com/articles/22/07/15/apple-argues-that-anti-steering-injunction-was-legally-improper-in-new-brief?utm_medium=rss Apple challenges injunction against self preferencing servicesApple on Friday submitted a final filing in its ongoing legal battle with Epic Games arguing that an injunction targeting anti steering on the App Store should get tossed out Credit Epic GamesIn a cross appeal brief submitted to the Ninth Circuit Court of Appeals Apple lays out its argument as to why the anti steering injunction was legally improper More specifically the iPhone maker argues that the court handed down an unprecedented result despite the fact that Epic did not prove harm Read more 2022-07-16 11:45:34
海外ニュース Japan Times latest articles G20 finance talks end without joint statement amid rift over Ukraine https://www.japantimes.co.jp/news/2022/07/16/business/economy-business/g20-finance-ministers-communique-ukraine/ G finance talks end without joint statement amid rift over UkraineFinance chiefs from the Group of major economies fell short of issuing a joint statement due to their rift over Russia s war in Ukraine 2022-07-16 20:45:08
海外ニュース Japan Times latest articles Shodai ends Ichinojo’s perfect run after seven days at Nagoya tourney https://www.japantimes.co.jp/sports/2022/07/16/sumo/basho-reports/nagoya-sumo-day-7/ Shodai ends Ichinojo s perfect run after seven days at Nagoya tourneyIchinojo had beaten yokozuna Terunofuji as well as ozeki Takakeisho and Mitakeumi over the past three days but the struggling Shodai showed what he is 2022-07-16 20:20:25
ニュース BBC News - Home UK heatwave: Stay safe to avoid excess deaths in hot weather - health boss https://www.bbc.co.uk/news/uk-62189515?at_medium=RSS&at_campaign=KARANGA agency 2022-07-16 11:47:35
ニュース BBC News - Home Tory leadership rivals trade blows over tax and spending https://www.bbc.co.uk/news/uk-politics-62186878?at_medium=RSS&at_campaign=KARANGA blows 2022-07-16 11:19:46
ニュース BBC News - Home Saudi Arabia: The significance of Biden's fist bump with crown prince https://www.bbc.co.uk/news/world-middle-east-62189543?at_medium=RSS&at_campaign=KARANGA salman 2022-07-16 11:14:28
ニュース BBC News - Home Missile strike on Ukraine space plant in Dnipro kills three https://www.bbc.co.uk/news/world-europe-62189844?at_medium=RSS&at_campaign=KARANGA nikopol 2022-07-16 11:20:37
北海道 北海道新聞 京都・祇園祭、きらびやかに宵山 17日に3年ぶり「山鉾巡行」 https://www.hokkaido-np.co.jp/article/706678/ 山鉾巡行 2022-07-16 20:21:38
北海道 北海道新聞 空知管内49人感染 新型コロナ https://www.hokkaido-np.co.jp/article/706681/ 新型コロナウイルス 2022-07-16 20:18:00
北海道 北海道新聞 コロナ過去最多11万人超感染 第7波本格化、BA・5が一因 https://www.hokkaido-np.co.jp/article/706674/ 新型コロナウイルス 2022-07-16 20:16:04
北海道 北海道新聞 前大統領、国外逃亡の説明せず 経済危機のスリランカ https://www.hokkaido-np.co.jp/article/706680/ 前大統領 2022-07-16 20:02:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)