사용자 도구

사이트 도구


ci:jenkins:agent

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
ci:jenkins:agent [2022/01/05 18:30]
kwon37xi
ci:jenkins:agent [2022/05/30 23:19] (현재)
kwon37xi
줄 16: 줄 16:
   * [[https://www.youtube.com/watch?v=ymI02j-hqpU|How to Setup Docker Containers As Build Agents for Jenkins - YouTube]]   * [[https://www.youtube.com/watch?v=ymI02j-hqpU|How to Setup Docker Containers As Build Agents for Jenkins - YouTube]]
  
-===== AWS Fargate =====+===== docker images =====
   * [[aws:fargate|AWS Fargate]]를 이용하면, [[:docker|Docker]] 컨테이너를 필요에 따라 수행하는 Jenkins Agent 로 만들 수 있다.   * [[aws:fargate|AWS Fargate]]를 이용하면, [[:docker|Docker]] 컨테이너를 필요에 따라 수행하는 Jenkins Agent 로 만들 수 있다.
-  * [[ci:jenkins:aws_plugin|Jenkins AWS Plugins]] +    * [[ci:jenkins:aws_plugin|Jenkins AWS Plugins]] 
-  * [[https://plugins.jenkins.io/amazon-ecs/|Amazon Elastic Container Service (ECS) Fargate Jenkins plugin]] +  * [[https://hub.docker.com/r/jenkins/agent/|jenkins/agent]] : 다른 agent 들의 부모. debian, alpine, windows 선택가능. 
-  * [[https://www.jenkins.io/doc/pipeline/steps/amazon-ecs/|Amazon Elastic Container Service (ECS) Fargate plugin]] +    * [[https://github.com/jenkinsci/docker-agent|jenkinsci/docker-agent: Base Docker image for Jenkins Agents]] 
-  * [[https://www.youtube.com/watch?v=K2CBHLwPL50|Run Jenkins Pipeline With AWS ECS Fargate & AWS EC2 Based ECS Cluster | Learn DevOps Tools Ep4 YouTube]] +    * username : ''jenkins'' 
-  * [[https://aws.amazon.com/ko/blogs/devops/building-a-serverless-jenkins-environment-on-aws-fargate/|Building serverless Jenkins environment on AWS Fargate | AWS DevOps Blog]] +  * [[https://hub.docker.com/r/jenkins/inbound-agent/|Docker jenkins/inbound-agent]] : java 버전별로 찾을 수 있다. docker & fargate 용. 
-    * [[https://github.com/aws-samples/serverless-jenkins-on-aws-fargate/tree/main/docs|aws-samples/serverless-jenkins-on-aws-fargate]] +    * [[https://github.com/jenkinsci/docker-inbound-agent|jenkinsci/docker-inbound-agent: Docker image for a Jenkins agent which can connect to Jenkins using TCP or Websocket protocols]] 
-  * [[https://hub.docker.com/r/jenkins/inbound-agent/|Docker jenkins/inbound-agent]] : java 버전별로 찾을 수 있다.+  * [[https://hub.docker.com/r/jenkins/ssh-agent|jenkins/ssh-agent Docker Image | Docker Hub]] 
 +  * [[https://hub.docker.com/r/jenkins/agent|jenkins/agent Docker Image | Docker Hub]] 
 ===== kubernetes / k8s ===== ===== kubernetes / k8s =====
   * [[:kubernetes|Kubernetes k8s]]   * [[:kubernetes|Kubernetes k8s]]
   * [[https://www.youtube.com/watch?v=ZXaorni-icg|How to Use Kubernetes Pods As Jenkins Agents - YouTube]]   * [[https://www.youtube.com/watch?v=ZXaorni-icg|How to Use Kubernetes Pods As Jenkins Agents - YouTube]]
 +
 +===== Windows =====
 +  * on [[:windows|Windows]]
 +  * [[https://www.youtube.com/watch?v=N8AQTlHoBKc|How to Install Jenkins Agent on Windows - YouTube]]
 +
 +===== stash / unstash =====
 +  * [[https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/|Pipeline: Basic Steps]] ''stash''
 +  * [[https://www.youtube.com/watch?v=0GQZzLlnUws|What Is stash and unstash in Jenkins? - YouTube]]
 +  * 특정 agent 에서 ''stash'' 한 것을 다른 agent 에서 ''unstash'' 하여 여러 agent 들 간에 build 도중 생성된 파일을 공유할 수 있다.
 +  * [[https://gist.github.com/darinpope/74462757661613ac9b8cdd742c3918a2|What-Is-stash-and-unstash-in-Jenkins.md]]
 +
 +<code groovy>
 +pipeline {
 +  agent none
 +
 +  stages {
 +    stage('Hello') {
 +      agent { label 'linux' }
 +      steps {
 +        sh '''
 +          touch file.txt
 +          mkdir -p target
 +          touch target/file2.jar
 +          touch target/file3.war
 +          tree
 +        '''
 +        stash(name: 'myStash', includes: '**/*.war')
 +      }
 +    }
 +    stage('check the file') {
 +      agent { label 'macos' }
 +      steps {
 +        unstash 'myStash'
 +        sh 'tree'
 +      }
 +    }
 +  }
 +}
 +
 +</code>
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://www.youtube.com/watch?v=99DddJiH7lM|How to Create an Agent Node in Jenkins - YouTube]]   * [[https://www.youtube.com/watch?v=99DddJiH7lM|How to Create an Agent Node in Jenkins - YouTube]]
   * [[https://youtu.be/MTLgbp0GH8w|How to restart jenkins agent]] : UI, Script 등으로 재시작하기   * [[https://youtu.be/MTLgbp0GH8w|How to restart jenkins agent]] : UI, Script 등으로 재시작하기
ci/jenkins/agent.1641375033.txt.gz · 마지막으로 수정됨: 2022/01/05 18:30 저자 kwon37xi