"Unrecognized type: int32" happens when redeploy a pull request
Closed this issue · 1 comments
kuanfandevops commented
This error doesn't happen during the first time deployment. It only happens for the redeployment when pr has new changes. It is very likely related to the replica count, especially when the dc template has a parameter for replica count.
+ ./npmw run deploy -- --pr=138 --env=dev
> pipeline@1.0.0 deploy /var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline
> node deploy.js "--pr=138" "--env=dev"
Error: command: oc --namespace=tbiwaq-dev apply -f - --output=name
stderr:Error from server: unrecognized type: int32
Error from server: unrecognized type: int32
Error from server: unrecognized type: int32
Error from server: unrecognized type: int32
at OpenShiftClientX._action (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/node_modules/@bcgov/pipeline-cli/lib/OpenShiftClient.js:148:13)
at OpenShiftClientX.objectDefAction (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/node_modules/@bcgov/pipeline-cli/lib/OpenShiftClient.js:394:21)
at OpenShiftClientX.apply (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/node_modules/@bcgov/pipeline-cli/lib/OpenShiftClient.js:479:25)
at OpenShiftClientX.applyAndDeploy (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/node_modules/@bcgov/pipeline-cli/lib/OpenShiftClientX.js:586:10)
at module.exports.settings (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/lib/deploy.js:144:6)
at Object.<anonymous> (/var/lib/jenkins/jenkins-slave-prod-12-997bk/workspace/zeva_PR-138/.pipeline/deploy.js:5:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pipeline@1.0.0 deploy: `node deploy.js "--pr=138" "--env=dev"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pipeline@1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
kuanfandevops commented
Not an issue.
Should use ${{variableName}} in template files if the value is a numer.