tlc-pack / tlcpack

https://tlcpack.ai/
Apache License 2.0
23 stars 30 forks source link

ci_hexagon image not being automatically validated #103

Closed leandron closed 2 years ago

leandron commented 2 years ago

When checking the images from our automated build today, it seems ci_hexagon is not being validated due to missing updates in https://github.com/tlc-pack/tlcpack/blob/main/jenkins/JenkinsFile-validate-docker-images.

Specifically, it would require updates in the parameter passing to the validation job: https://github.com/tlc-pack/tlcpack/blob/c2aba3d3d3d0829fe3dd0d3b9264ca9a9b6d0c1c/jenkins/JenkinsFile-validate-docker-images#L115-L123

Also being added to the retagging and upload phase: https://github.com/tlc-pack/tlcpack/blob/c2aba3d3d3d0829fe3dd0d3b9264ca9a9b6d0c1c/jenkins/JenkinsFile-validate-docker-images#L136-L156

cc @mehrdadh

mehrdadh commented 2 years ago

@leandron thanks for pointing out this issue. I'm in the process of updating ci-hexagon. I will add testing in tlcpack as well.

leandron commented 2 years ago

It seems there is an error with the current Jenkinsfile, that is causing the validation to fail. Probably just a missing comma on line 122 below:

https://github.com/tlc-pack/tlcpack/blob/de788391179ba2d6273ee4c73f0fce590458dfe8/jenkins/JenkinsFile-validate-docker-images#L121-L125

Link: https://ci.tlcpack.ai/blue/organizations/jenkins/docker-images-ci%2Fdaily-docker-image-validate/detail/daily-docker-image-validate/84/pipeline

[2022-04-08T06:37:26.171Z]                  [$class: 'StringParameterValue', name: 'ci_hexagon_param', value: "${DOCKERHUB_USER}/ci_hexagon:${DOCKER_TAG}"]
[2022-04-08T06:37:26.171Z]                         ^
[2022-04-08T06:37:26.171Z] 
[2022-04-08T06:37:26.171Z] WorkflowScript: 123: Unsupported map entry expression for CPS transformation in this context @ line 123, column 52.
[2022-04-08T06:37:26.171Z]    : 'StringParameterValue', name: 'ci_hexa
[2022-04-08T06:37:26.171Z]                                  ^
[2022-04-08T06:37:26.171Z] 
[2022-04-08T06:37:26.171Z] WorkflowScript: 123: Unsupported map entry expression for CPS transformation in this context @ line 123, column 79.
[2022-04-08T06:37:26.171Z]    ame: 'ci_hexagon_param', value: "${DOCKE
[2022-04-08T06:37:26.171Z]                                  ^
[2022-04-08T06:37:26.171Z] 
[2022-04-08T06:37:26.171Z] 3 errors
[2022-04-08T06:37:26.171Z] 
[2022-04-08T06:37:26.171Z]  at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
[2022-04-08T06:37:26.171Z]  at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1107)
[2022-04-08T06:37:26.171Z]  at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
[2022-04-08T06:37:26.171Z]  at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
[2022-04-08T06:37:26.171Z]  at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
[2022-04-08T06:37:26.171Z]  at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
[2022-04-08T06:37:26.171Z]  at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
[2022-04-08T06:37:26.171Z]  at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)
[2022-04-08T06:37:26.171Z]  at groovy.lang.GroovyShell.parse(GroovyShell.java:689)
[2022-04-08T06:37:26.171Z]  at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
[2022-04-08T06:37:26.171Z]  at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
[2022-04-08T06:37:26.171Z]  at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:571)
[2022-04-08T06:37:26.171Z]  at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:523)
[2022-04-08T06:37:26.171Z]  at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:335)
[2022-04-08T06:37:26.171Z]  at hudson.model.ResourceController.execute(ResourceController.java:101)
[2022-04-08T06:37:26.171Z]  at hudson.model.Executor.run(Executor.java:442)
[2022-04-08T06:37:26.177Z] Finished: FAILURE
mehrdadh commented 2 years ago

@leandron thanks for flagging this. I will send a follow up PR. I thought the jenkins file would run in pre-commit CI, no?

leandron commented 2 years ago

No we don’t have CI for the jenkinsfiles like this.

leandron commented 2 years ago

I checked this one, and the problem is now fixed. Thanks @mehrdadh!