- name: Install Plugin shell: helm plugin update push || helm plugin install https://github.com/chartmuseum/helm-push || true - name: Get harbor username shell: cat {{ harbor_secret_mounted_path }}/username register: harbor_username - name: Get harbor password shell: cat {{ harbor_secret_mounted_path }}/password register: harbor_password - name: Install Plugin shell: helm plugin update push || helm plugin install https://github.com/chartmuseum/helm-push - name: Add Harbor Helm repository and Test repository shell: helm repo add "{{ chart_repository }}-staging" "https://{{ chart_registry_url }}/{{ chart_name }}-staging" --username="{{ harbor_username.stdout }}" --password="{{ harbor_password.stdout }}" && helm repo add "{{ chart_repository }}" "https://{{ chart_registry_url }}/{{ chart_name }}" --username="{{ harbor_username.stdout }}" --password="{{ harbor_password.stdout }}" - name: Pull down Helm Chart shell: helm pull "{{ chart_repository }}-staging/{{ chart_name }}" --version="{{ version }}" - name: Push chart "{{ chart_name }}" to Helm registry command: helm push "{{ chart_name }}-{{ version }}".tgz "{{ chart_repository }}"