简体   繁体   English

如何将 aws lambda 部署为詹金斯的代理?

[英]How can I deploy aws lambda as jenkins's agent?

I'm going to use Jenkins for CI/CD for the first time in my project.我将在我的项目中首次将 Jenkins 用于 CI/CD。 So, I'm using "gitHub hook trigger for GITScm polling" to automatically make the code into a docker image when github pushed, and upload the image to the ECR when passing the test using "pytest".所以,我使用“gitHub hook trigger for GITScm polling”在github推送时自动将代码制作成docker图像,并在使用“pytest”通过测试时将图像上传到ECR。

However, it is burdensome to run the Docker image directly on the Jenkins master server and operate the pytest, so I just want to test the code in aws lambda whenever it is pushed.( in other words, I want to use lambda as Jenkins agent ) However, it is burdensome to run the Docker image directly on the Jenkins master server and operate the pytest, so I just want to test the code in aws lambda whenever it is pushed.( in other words, I want to use lambda as Jenkins agent )

I want to implement this process through Jenkins pipeline(Jenkinsfile), but I don't know how.我想通过 Jenkins 管道(Jenkinsfile)来实现这个过程,但我不知道怎么做。 Is there a way to create and deploy aws lambda through the Jenkins pipeline?有没有办法通过 Jenkins 管道创建和部署 aws lambda?

What you could try is to use the AWS Lambda Plugin .您可以尝试使用AWS Lambda Plugin

It allows you to build and deploy lambdas from Jenkins.它允许您从 Jenkins 构建和部署 lambda。 So you could create a lambda containg your logic, invoking it and using the result afterwards.因此,您可以创建一个 lambda 包含您的逻辑,然后调用它并使用结果。

But keep in mind that lambda might not be the right tool for the job.但请记住,lambda 可能不是适合这项工作的工具。 Execution only can take 15 minutes, and I think you are better off using ECS/EKS.执行只需要 15 分钟,我认为你最好使用 ECS/EKS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过aws cli在组织的Cloudfront实例中部署lambda @ edge代码? - How can I deploy lambda@edge code in an organisation's Cloudfront instances via aws cli? 如何将特定的 AWS Lambda function 部署到特定的阶段 - How can I deploy a specific AWS Lambda function to a specific Stage 如何使用Lambda将AWS CodeCommit推送到S3? - How can I push AWS CodeCommit to S3 using Lambda? 如何在openFaaS中部署无服务器应用程序,类似于带有S3的AWS lambda - How to deploy a serverless application in openFaaS similar to AWS lambda with S3 我可以在 AWS Lambda 上使用 .Net Framework 4.5 部署 RESTful API 吗? - Can I deploy a RESTful API with .Net Framework 4.5 on AWS Lambda? 如何从 jenkins 部署(创建/更新/删除)cloudformation 模板到我的 AWS 环境? - How can I deploy (create/update/delete) cloudformation templates from jenkins to my AWS environment? 如何使用jenkins进行构建并在AWS上部署? - How to build with jenkins and deploy on aws? 如何在 AWS lambda 中部署脚本 - How to deploy a script in AWS lambda AWS lambda:如何在 lambda 中运行 aws cli 命令 - AWS lambda: how can I run aws cli commands in lambda 如何使用 lerna 将 monorepo 代码部署到 AWS Lambda? - How do I deploy monorepo code to AWS Lambda using lerna?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM