-
Notifications
You must be signed in to change notification settings - Fork 553
feat: copy container images #4209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 160 commits
Commits
Show all changes
165 commits
Select commit
Hold shift + click to select a range
8a7d822
Add custom tag
avdhesh-devtron 127ad00
Refactor handle concurrency
avdhesh-devtron d5c6102
Refactor
avdhesh-devtron c559393
Update workflow when trigger failes due to tag conflict
avdhesh-devtron 3dfde7a
Fix error
avdhesh-devtron 2768ea5
temp
avdhesh-devtron e3da3b8
Build history failure case
avdhesh-devtron ae8b894
Merge branch 'custom-tag' of github.com:devtron-labs/devtron into ref…
avdhesh-devtron edd2d54
Custom tag logic extracted
avdhesh-devtron abd20e8
Fix build
avdhesh-devtron bd6b603
fix get query
avdhesh-devtron f97fac5
fix error handling
avdhesh-devtron 9ebfbb5
fix iota value
avdhesh-devtron 0818862
Fix errors
avdhesh-devtron ef9af2c
Return error when image path conflicts
avdhesh-devtron 7c672de
Handle errors
avdhesh-devtron 98cd350
Handle failed ci_workflow
avdhesh-devtron 0b8efba
Handle failed ci_workflow
avdhesh-devtron 47729b1
Remove unnecessary image path deactivation
avdhesh-devtron ec8510f
Fix migration
avdhesh-devtron a564454
Merge branch 'main' of github.com:devtron-labs/devtron into refactor-…
avdhesh-devtron bf99dce
Refactor
avdhesh-devtron 720a99d
Refactor
avdhesh-devtron b841f29
Add validations
avdhesh-devtron c955e21
Remove regex check
avdhesh-devtron 3ea5834
Fix error message
avdhesh-devtron 8fde21d
Return bad request in case of trigger
avdhesh-devtron 0f3c248
add validation
avdhesh-devtron 06edac9
add validation
avdhesh-devtron df484ca
ad ci workflow id in status api
avdhesh-devtron 786121b
add comments
avdhesh-devtron 500a256
main merge
iamayushm 1febd7d
custom image tag migration
iamayushm ec1dd53
sql script correction
iamayushm 8f3a54b
fix: validation and sql script
iamayushm 33ae161
fixing null value in custom tag
iamayushm 558928c
Merge branch 'main' into refactor-tag-generation
iamayushm 74f1c38
marking image tag unreserved on abort
iamayushm 5ab08bb
main merge
iamayushm 1252c91
main merge
iamayushm a0c5a10
wip
gireesh-naidu 4f80365
wip
gireesh-naidu 29d5e8c
ci type parent artifats fetched
gireesh-naidu 6beb311
commented not required data
gireesh-naidu 3a68687
custom tag cd and in trigger api
iamayushm 0d0ed18
almost done, optimise TODOs
gireesh-naidu 673570d
pagination done for OSS
gireesh-naidu d043980
calling V2 function in resthandler
gireesh-naidu 2bf1cd3
bug fix for no deployment triggered on the pipeline and query fix for…
gireesh-naidu d78a097
query fix for emptyexclude artifacts ids
gireesh-naidu 89351cf
code review comments
kripanshdevtron 3a1f591
Merge branch 'main' into refactor-tag-generation
iamayushm 15b3ba1
migration script fix
iamayushm 2ff5cf8
fix get api
iamayushm badac18
tag validation updated
iamayushm 849ebfe
wip: validaion using regex
iamayushm 87420ff
wip
iamayushm 784b65a
fix validation
iamayushm fca223a
fixing error string
iamayushm 8b39dbe
fix validation
iamayushm 20f35c6
tag validation updated
iamayushm a3277dc
tag pattern modification
iamayushm 5f1a6c7
wip: fix
iamayushm d89d12e
fixing regex
iamayushm 5be2095
Merge branch 'main' into refactor-tag-generation
iamayushm 0f73a9b
wip custom tag
iamayushm b713e2d
pr review changes
iamayushm 3112044
Merge branch 'refactor-tag-generation' into custom-tag-cd
iamayushm 5d131db
Revert "Merge branch 'refactor-tag-generation' into custom-tag-cd"
iamayushm ee8fbbf
Revert "Revert "Merge branch 'refactor-tag-generation' into custom-ta…
iamayushm 6fa35bd
enable disable changes
iamayushm a489727
tag enabled sql script
iamayushm d98117f
enable flag in get api
iamayushm c009e93
Merge remote-tracking branch 'origin/artifact-api-refactoring' into c…
iamayushm 4787091
searchstring refactor fix
gireesh-naidu 1402943
wip: get api fix
iamayushm b0021db
custom tag enabled moved outside
iamayushm cb0db3b
wip
iamayushm 70e70d8
wip
iamayushm b1dad32
update api
iamayushm 2349e43
wip
iamayushm a12e68d
Merge remote-tracking branch 'origin/artifact-api-refactoring' into c…
iamayushm 5f35f1c
wip
iamayushm 53532cf
added rollback API V2 in
gireesh-naidu 4357070
added artifact createdOn time
gireesh-naidu 73bcb32
pagination fix
gireesh-naidu dc61990
fix
gireesh-naidu c9acbb9
adding support for parent stage
iamayushm 0ba2890
delete redundant ids
gireesh-naidu b505dc7
adding registry type and registry name flag in api
iamayushm 964d135
hiding credential source type and value from request
iamayushm 8d2d3fc
adding registry type and name flag
iamayushm 8faf24a
fixes: trigger pre cd
iamayushm b9948a1
deleting cd custom tag on pipeline delete
iamayushm 15cd7bc
setting data source value
gireesh-naidu d282ca2
sql script
gireesh-naidu 37071c7
artifacts save code fix
iamayushm bf4f173
removing unnecessary information
iamayushm dea49ba
fix image api
iamayushm 9f7aad3
adding plugin parent
iamayushm 686ba66
queries optimised and created queryBuilder for getting artifacts list
gireesh-naidu f5a9425
sync oss code
gireesh-naidu 851c7f4
optimise getting git-triggers logic
gireesh-naidu b2fbcfb
fix
gireesh-naidu 0b39d41
post ci fixes
iamayushm 6b40a61
required changes after merging api refactor branch
iamayushm feac3ea
fix list api
iamayushm 1c96fe5
merge main
gireesh-naidu 469d1a3
totalcount fix
gireesh-naidu 84b3911
offset validation
gireesh-naidu 1ff96d7
fixes post ci
iamayushm d45c1da
fix custom tag id
iamayushm ffe740f
custom tag fix and ci artifact api fix
iamayushm e4619ea
adding image_path_reservation_ids
iamayushm 0324adb
code for deleting reserved tags
iamayushm 2bf3ede
fix sql object
iamayushm a34e214
adding array field in sql object
iamayushm 9bccb07
fix: custom tag enabled
iamayushm b4d7c84
api refactoring merge
iamayushm 2444130
fix custom tag used even if disabled
iamayushm 5075851
adding data source
iamayushm d495f9a
refactoring skopeo parsing
iamayushm 9c0063c
sql script modified plus registry credentials
iamayushm 6545b2b
removing source info handling and adding comments
iamayushm 262792f
new cd workflow in case of auto trigger and plugin generated image
iamayushm b915cca
idempotency in saving artifacts and deploy cd workflow fix
iamayushm 2e472ed
fix image order
iamayushm db0d216
fix cdWorkflow object
iamayushm f271155
removing unnecessary code
iamayushm 4a03123
fix post trigger
iamayushm fa09e81
Merge branch 'main' into artifact-api-refactoring
gireesh-naidu 90ae68e
showing source info
iamayushm 2c6e251
sql script no fix
iamayushm 86349c0
artifact api refactoring merge
iamayushm 542bd77
enterprise sync
ShashwatDadhich abc6fad
qa fixes
iamayushm 26ff795
offset issue
gireesh-naidu cc152f4
query change
gireesh-naidu 47be577
query change
gireesh-naidu 92aac1d
fix
gireesh-naidu 13c60fb
fix
gireesh-naidu 4d78b07
Merge branch 'main' into custom-tag-cd-v2
iamayushm 686061f
upstream branch merge
iamayushm 24fa757
down script file
iamayushm ba4bc33
fix migration script
iamayushm 4acfa07
plugin migration
iamayushm 6f4edfb
bug fixes
iamayushm 20d5514
qa issue fix
iamayushm a736d11
bug fixes
iamayushm 57d2eb1
bug fixes
iamayushm 079e310
create ecr repo if not present
iamayushm 39f27aa
bug fixes
iamayushm 3f5129d
big fixes
iamayushm ebae885
sql script correction
iamayushm e328c05
bug fixes
iamayushm 542072a
renaming skopeo to copy container image
iamayushm 7e6d3cf
sql script update
iamayushm 88a0b58
main merge
iamayushm 98631ef
enterprise bugs
iamayushm b9eda3c
PE REVIEW CHANFS
iamayushm 0d84636
updating plugin image in migration
iamayushm 1ba1bac
Merge branch 'main' into custom-tag-cd-v2
iamayushm 335f67e
sql script correction
iamayushm 3871da4
sql script update
iamayushm 2818509
Merge branch 'main' into custom-tag-cd-v2
iamayushm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -596,7 +596,7 @@ func (handler PipelineConfigRestHandlerImpl) TriggerCiPipeline(w http.ResponseWr | |
| resp, err := handler.ciHandler.HandleCIManual(ciTriggerRequest) | ||
| if errors.Is(err, bean1.ErrImagePathInUse) { | ||
| handler.Logger.Errorw("service err duplicate image tag, TriggerCiPipeline", "err", err, "payload", ciTriggerRequest) | ||
| common.WriteJsonResp(w, err, response, http.StatusConflict) | ||
| common.WriteJsonResp(w, err, err, http.StatusConflict) | ||
| return | ||
| } | ||
| if err != nil { | ||
|
|
@@ -1976,27 +1976,49 @@ func (handler PipelineConfigRestHandlerImpl) extractCipipelineMetaForImageTags(a | |
| externalCi = false | ||
| ciPipelineId = 0 | ||
| appId = 0 | ||
|
|
||
| ciPipeline, err := handler.ciPipelineRepository.GetCiPipelineByArtifactId(artifactId) | ||
| var externalCiPipeline *pipelineConfig.ExternalCiPipeline | ||
| ciArtifact, err := handler.ciArtifactRepository.Get(artifactId) | ||
| if err != nil { | ||
| if err == pg.ErrNoRows { | ||
| handler.Logger.Infow("no ciPipeline found by artifact Id, fetching external ci-pipeline ", "artifactId", artifactId) | ||
| externalCiPipeline, err = handler.ciPipelineRepository.GetExternalCiPipelineByArtifactId(artifactId) | ||
| } | ||
| handler.Logger.Errorw("Error in fetching ci artifact by ci artifact id", "err", err) | ||
| return externalCi, ciPipelineId, appId, err | ||
| } | ||
| if ciArtifact.DataSource == repository.POST_CI { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment down all the probable DataSource in model |
||
| ciPipelineId = ciArtifact.ComponentId | ||
| ciPipeline, err := handler.pipelineBuilder.GetCiPipelineById(ciPipelineId) | ||
| if err != nil { | ||
| handler.Logger.Errorw("error occurred in fetching ciPipeline/externalCiPipeline by artifact Id ", "err", err, "artifactId", artifactId) | ||
| handler.Logger.Errorw("no ci pipeline found for given artifact", "err", err, "artifactId", artifactId, "ciPipelineId", ciPipelineId) | ||
| return externalCi, ciPipelineId, appId, err | ||
| } | ||
| } | ||
|
|
||
| if ciPipeline.Id != 0 { | ||
| ciPipelineId = ciPipeline.Id | ||
| appId = ciPipeline.AppId | ||
| } else if ciArtifact.DataSource == repository.PRE_CD || ciArtifact.DataSource == repository.POST_CD { | ||
| cdPipelineId := ciArtifact.ComponentId | ||
| cdPipeline, err := handler.pipelineBuilder.GetCdPipelineById(cdPipelineId) | ||
| if err != nil { | ||
| handler.Logger.Errorw("no cd pipeline found for given artifact", "err", err, "artifactId", artifactId, "cdPipelineId", cdPipelineId) | ||
| return externalCi, ciPipelineId, appId, err | ||
| } | ||
| ciPipelineId = cdPipeline.CiPipelineId | ||
| appId = cdPipeline.AppId | ||
| } else { | ||
| externalCi = true | ||
| ciPipelineId = externalCiPipeline.Id | ||
| appId = externalCiPipeline.AppId | ||
| ciPipeline, err := handler.ciPipelineRepository.GetCiPipelineByArtifactId(artifactId) | ||
| var externalCiPipeline *pipelineConfig.ExternalCiPipeline | ||
| if err != nil { | ||
| if err == pg.ErrNoRows { | ||
| handler.Logger.Infow("no ciPipeline found by artifact Id, fetching external ci-pipeline ", "artifactId", artifactId) | ||
| externalCiPipeline, err = handler.ciPipelineRepository.GetExternalCiPipelineByArtifactId(artifactId) | ||
| } | ||
| if err != nil { | ||
| handler.Logger.Errorw("error occurred in fetching ciPipeline/externalCiPipeline by artifact Id ", "err", err, "artifactId", artifactId) | ||
| return externalCi, ciPipelineId, appId, err | ||
| } | ||
| } | ||
| if ciPipeline.Id != 0 { | ||
| ciPipelineId = ciPipeline.Id | ||
| appId = ciPipeline.AppId | ||
| } else { | ||
| externalCi = true | ||
| ciPipelineId = externalCiPipeline.Id | ||
| appId = externalCiPipeline.AppId | ||
| } | ||
| } | ||
| return externalCi, ciPipelineId, appId, nil | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,8 @@ func (r ApplicationRouterImpl) initApplicationRouter(router *mux.Router) { | |
| router.Path("/{applicationName}/managed-resources"). | ||
| Methods("GET"). | ||
| HandlerFunc(r.handler.ManagedResources) | ||
| router.Path("/{name}/rollback"). | ||
| router.Path("/{name}" + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. applicationName ? |
||
| "/rollback"). | ||
| Methods("GET"). | ||
| HandlerFunc(r.handler.Rollback) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this below code can be part of service