* What is different GitHub Flow and Git Flow?
* What is GitHub Actions?
* How to write the simple workflow?
* What's problem in GitHub Actions UI?
* What's problem with Secrets in GitHub Actions?
* How to write your first GitHub Actions and upload to the marketplace?
* What's a problem with environment variables in GitHub Actions?
Prometheus: What is is, what is new, what is comingJulien Pivotto
Prometheus is a metrics-based monitoring and alerting system and also the project with the second longest tenure within the CNCF. As such you have probably heard about it by now. We will give you a short introduction to Prometheus, what it is and why it was such a big deal when it was initially released. In all those years since then, the project has only gained speed, which provides us with the opportunity to tell you about all the exciting new features that have just been released or are in the pipeline, including opportunities to contribute to the project and its wider ecosystem.
Talk at kubecon 2021
* What is different GitHub Flow and Git Flow?
* What is GitHub Actions?
* How to write the simple workflow?
* What's problem in GitHub Actions UI?
* What's problem with Secrets in GitHub Actions?
* How to write your first GitHub Actions and upload to the marketplace?
* What's a problem with environment variables in GitHub Actions?
Prometheus: What is is, what is new, what is comingJulien Pivotto
Prometheus is a metrics-based monitoring and alerting system and also the project with the second longest tenure within the CNCF. As such you have probably heard about it by now. We will give you a short introduction to Prometheus, what it is and why it was such a big deal when it was initially released. In all those years since then, the project has only gained speed, which provides us with the opportunity to tell you about all the exciting new features that have just been released or are in the pipeline, including opportunities to contribute to the project and its wider ecosystem.
Talk at kubecon 2021
At AWS re:Invent, we have launched support for blue/green deployments for services hosted using AWS Fargate and Amazon Elastic Container Service (Amazon ECS). Blue/green deployments help you minimize downtime during application updates. They allow you to launch a new version of your application alongside the old version and test the new version before you reroute traffic to it. You can also monitor the deployment process and, if there is an issue, quickly roll back.
In this workshop, you will create a new service in AWS Fargate that uses AWS CodeDeploy to manage the deployments, testing, and traffic cutover for you.
After talking to several Drupal followers during our last meetup, I realised quite a few people still don't employ version control.
I strongly consider this best practice when building a site, and thought it would be a good opportunity to go over its importance and how you can make it work for you.
Git offers several advantages:
• It's super fast
• It's easy.
• And no you don't need to be familiar with Command Line code (there are several great GUI's out there).
GIT Version Control works by keeping track of all successive changes you make to a site.
The biggest advantage of this is easily undoing any mistakes you might make along the way.
It's a great feeling to know Version Control has your back that you can roll back if something goes catastrophically wrong.
It's also a big bonus in collaborative development.
As soon as more than one person works on a project things get a lot more complicated.
What happens when 2 edits effect the same file? How do you know what's new, what's old and what's changed?
No worries, simply merge the variations and let GIT deal with the rest.
GIT is not just for the developers of this world but can be a life saver for themers, site maintainers and the like.
Most people will admit they should use it, but either don't know how or believe it's hard to integrate.
The reality is that it's actually pretty simple and once you start integrating GIT into your workflow you'll ask yourself "Why the hell did I keep using ftp" - I know I did.
FTP is so yesterday, its slow, it's cumbersome to use and it's a very manual method.
Switch to GIT, start using GIT, and never look back.
It is deep journey into the ocean of cloud ready software design, a set of rules that makes a solution scalable and resilient, two core requirements for any cloud based solution.
Material prepared to present top government officials of NISG (National Institute for Small Governance) workshop at New Delhi by CCICI App Factory Task Force.
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...Sonatype
There are numerous examples of DevOps and Continuous Delivery reference architectures available, and each of them vary in levels of detail, tools highlighted, and processes followed. Yet, there is a constant theme among the tool sets: Jenkins, Maven, Sonatype Nexus, Subversion, Git, Docker, Puppet/Chef, Rundeck, ServiceNow, and Sonar seem to show up time and again.
At AWS re:Invent, we have launched support for blue/green deployments for services hosted using AWS Fargate and Amazon Elastic Container Service (Amazon ECS). Blue/green deployments help you minimize downtime during application updates. They allow you to launch a new version of your application alongside the old version and test the new version before you reroute traffic to it. You can also monitor the deployment process and, if there is an issue, quickly roll back.
In this workshop, you will create a new service in AWS Fargate that uses AWS CodeDeploy to manage the deployments, testing, and traffic cutover for you.
After talking to several Drupal followers during our last meetup, I realised quite a few people still don't employ version control.
I strongly consider this best practice when building a site, and thought it would be a good opportunity to go over its importance and how you can make it work for you.
Git offers several advantages:
• It's super fast
• It's easy.
• And no you don't need to be familiar with Command Line code (there are several great GUI's out there).
GIT Version Control works by keeping track of all successive changes you make to a site.
The biggest advantage of this is easily undoing any mistakes you might make along the way.
It's a great feeling to know Version Control has your back that you can roll back if something goes catastrophically wrong.
It's also a big bonus in collaborative development.
As soon as more than one person works on a project things get a lot more complicated.
What happens when 2 edits effect the same file? How do you know what's new, what's old and what's changed?
No worries, simply merge the variations and let GIT deal with the rest.
GIT is not just for the developers of this world but can be a life saver for themers, site maintainers and the like.
Most people will admit they should use it, but either don't know how or believe it's hard to integrate.
The reality is that it's actually pretty simple and once you start integrating GIT into your workflow you'll ask yourself "Why the hell did I keep using ftp" - I know I did.
FTP is so yesterday, its slow, it's cumbersome to use and it's a very manual method.
Switch to GIT, start using GIT, and never look back.
It is deep journey into the ocean of cloud ready software design, a set of rules that makes a solution scalable and resilient, two core requirements for any cloud based solution.
Material prepared to present top government officials of NISG (National Institute for Small Governance) workshop at New Delhi by CCICI App Factory Task Force.
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...Sonatype
There are numerous examples of DevOps and Continuous Delivery reference architectures available, and each of them vary in levels of detail, tools highlighted, and processes followed. Yet, there is a constant theme among the tool sets: Jenkins, Maven, Sonatype Nexus, Subversion, Git, Docker, Puppet/Chef, Rundeck, ServiceNow, and Sonar seem to show up time and again.
26. pytest test 命名規則
• Test file name:
recognizes test_*.py or *_test.py as the test files.
• Test function name:
requires the test method names to start with “test”.
28. 何謂單元測試
Wikipedia 的定義
• Unit tests are typically automated tests written and run by
software developers
• to ensure that a section of an application (known as the “unit”)
• meets its design and behaves as intended.
• In procedural programming, a unit could be an entire module,
but it is more commonly an individual function or procedure.
source: https://en.wikipedia.org/wiki/Unit_testing
31. 1st SUT 出口驗證
• 進入點(entry point): sum(a,b)
• 出口點(exit point): return value
SUT
sum(a, b)
return value
• SUT: Sytem Under Test, 被測試系統
• 有些人會稱為 CUT (Class Under Test or Code Under Test)
32. 1st SUT exit 驗證(cont.)
Production code Test code
33. 2nd SUT 出口驗證
• 進入點(entry point): M+(a)
• 出口點(exit point): MR(有時並沒有外部可存取的 getter)
SUT
M+
Calculator
[total]
MR
34. 3rd SUT 出口驗證
• 進入點(entry point): check(體溫)
• 出口點(exit point): disp(msg), 在電子看板秀警告文句
SUT
體溫
電子
看板
3rd party lib
46. $ pytest -v --setup-show test_fixtures.py
test_fixtures.py::test_some_data
SETUP F some_data
test_fixtures.py::test_some_data (fixtures used: some_data)PASSED
TEARDOWN F some_data
test_fixtures.py::test_inc_data
SETUP F some_data
test_fixtures.py::test_inc_data (fixtures used: some_data)PASSED
TEARDOWN F some_data
================================ 3 passed in 0.07s =============================
Fixture 的 SETUP & TEARDOWN
47. fixture — yield
• The code before the yield runs before each test;
• The code after the yield runs after the test.
$ pytest -v -s test_yield.py
test_yield.py::test Pre condition
Body of test
PASSEDPost condition
#1
#2
#3
86. 系統時間無法簡單地使用 mock object
E AttributeError: <module 'datetime' from
'/Users/maxlai/miniconda3/envs/pytestlab/lib/python3.8/datetime.py’>
does not have the attribute 'now'