Compare commits
	
		
			22 Commits
		
	
	
		
			c37d92a4cf
			...
			jenkins-fl
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					33fc7f66f9 | ||
| 
						 | 
					1426c8aff2 | ||
| 
						 | 
					7a26738ec7 | ||
| 
						 | 
					9168be6c3d | ||
| 
						 | 
					a8ab29d019 | ||
| 
						 | 
					40aba0972c | ||
| 
						 | 
					7735b0e283 | ||
| 
						 | 
					253b6c54a0 | ||
| 
						 | 
					1cc42b18b7 | ||
| 
						 | 
					54699d67f9 | ||
| 
						 | 
					8c0a55838e | ||
| 
						 | 
					e4d390a096 | ||
| 
						 | 
					0543580669 | ||
| 
						 | 
					453914a73b | ||
| 
						 | 
					640dae99f9 | ||
| 
						 | 
					5e4f750a42 | ||
| 
						 | 
					496c353ca1 | ||
| 
						 | 
					d060b629cf | ||
| 
						 | 
					858eacdc3f | ||
| 
						 | 
					f5398c1a9c | ||
| 
						 | 
					d855e795e2 | ||
| 
						 | 
					2f0ab04997 | 
							
								
								
									
										41
									
								
								.jenkins/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								.jenkins/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@@ -62,29 +62,28 @@ pipeline {
 | 
				
			|||||||
                            sh 'git clone ${DEPLOY_REPO} --branch fluxcd'
 | 
					                            sh 'git clone ${DEPLOY_REPO} --branch fluxcd'
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    sh '''
 | 
				
			||||||
                    dir('user-microservice-deploy/apps/user-microservice') {
 | 
					                        cd user-microservice-deploy/apps/user-microservice
 | 
				
			||||||
                        sh '''
 | 
					                        # Podmień tag obrazu w pliku deploy.yaml
 | 
				
			||||||
                            # Podmień tag obrazu w pliku deploy.yaml
 | 
					                        awk -v commit="$GIT_COMMIT" '
 | 
				
			||||||
                            awk -v commit="$GIT_COMMIT" '
 | 
					                        $0 ~ /name:[[:space:]]*api/ { in_api_container = 1; print; next }
 | 
				
			||||||
                            $0 ~ /name:[[:space:]]*api/ { in_api_container = 1; print; next }
 | 
					                        in_api_container && $0 ~ /^[[:space:]]*image:[[:space:]]*/ {
 | 
				
			||||||
                            in_api_container && $0 ~ /^[[:space:]]*image:[[:space:]]*/ {
 | 
					                            sub(/:[^:[:space:]]+$/, ":" commit)
 | 
				
			||||||
                                sub(/:[^:[:space:]]+$/, ":" commit)
 | 
					                            in_api_container = 0
 | 
				
			||||||
                                in_api_container = 0
 | 
					                            print
 | 
				
			||||||
                                print
 | 
					                            next
 | 
				
			||||||
                                next
 | 
					                        }
 | 
				
			||||||
                            }
 | 
					                        { print }
 | 
				
			||||||
                            { print }
 | 
					                        ' deploy.yaml > deploy.tmp && mv deploy.tmp deploy.yaml
 | 
				
			||||||
                            ' deploy.yaml > deploy.tmp && mv deploy.tmp deploy.yaml
 | 
					 | 
				
			||||||
                        '''
 | 
					                        '''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        sshagent(['gitea-deploy-key']) {
 | 
					                    sshagent(['gitea-deploy-key']) {
 | 
				
			||||||
                            sh '''
 | 
					                        sh '''
 | 
				
			||||||
                                git add deploy.yaml
 | 
					                            cd user-microservice-deploy/apps/user-microservice
 | 
				
			||||||
                                git diff-index --quiet HEAD || git commit -m "JENKINS: Changed deployed version to $GIT_COMMIT"
 | 
					                            git add deploy.yaml
 | 
				
			||||||
                                git push origin fluxcd
 | 
					                            git diff-index --quiet HEAD || git commit -m "JENKINS: Changed deployed version to $GIT_COMMIT"
 | 
				
			||||||
                            '''
 | 
					                            git push origin fluxcd
 | 
				
			||||||
                        }
 | 
					                        '''
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1 @@
 | 
				
			|||||||
1752168984
 | 
					1752257920
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user