Skip to content

Commit

Permalink
Fix issue with no publish env causing ssh_credential_id to not be added
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson-inviqa committed Mar 14, 2023
1 parent 97f3bfa commit d394c86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/_base/application/overlay/Jenkinsfile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ pipeline {
{% endif %}
{% if bool(@('pipeline.publish.enabled')) %}
stage('Publish') {
{% if @('pipeline.publish.environment') %}
{% set env = @('pipeline.publish.environment') %}
{% set ssh_credential_id = @('pipeline.publish.chart.git.ssh_credential_id') %}
{% if env or ssh_credential_id %}
environment {
{% for key, value in @('pipeline.publish.environment') %}
{% for key, value in env %}
{{ key }} = {{ value }}
{% endfor %}
{% if @('pipeline.publish.chart.git.ssh_credential_id') %}
WS_APP_PUBLISH_CHART_SSH_PRIVATE_KEY = credentials('{{ @('pipeline.publish.chart.git.ssh_credential_id') }}')
{% if ssh_credential_id %}
WS_APP_PUBLISH_CHART_SSH_PRIVATE_KEY = credentials('{{ ssh_credential_id }}')
{% endif %}
}
{% endif %}
Expand Down

0 comments on commit d394c86

Please sign in to comment.