Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 1 | --- |
| 2 | # CORD helm chart publishing tasks |
| 3 | |
| 4 | - project: |
| 5 | name: helm-repo |
| 6 | |
| 7 | # add repos that have documentation to the project list in both jobs |
| 8 | jobs: |
| 9 | - 'publish-helm-repo': |
| 10 | project-regexp: '^(helm-charts)$' |
| 11 | branch-regexp: '{supported-branches-regexp}' |
| 12 | |
| 13 | |
| 14 | - job-template: |
| 15 | id: publish-helm-repo |
| 16 | name: 'publish-helm-repo' |
Zack Williams | 66eef76 | 2018-05-07 17:06:03 -0700 | [diff] [blame] | 17 | description: | |
| 18 | Created by publish-helm-repo job-template from ci-management/jjb/helm.yaml |
Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 19 | |
| 20 | triggers: |
| 21 | - cord-infra-gerrit-trigger-merge: |
| 22 | gerrit-server-name: '{gerrit-server-name}' |
| 23 | project-regexp: '{project-regexp}' |
| 24 | branch-regexp: '{branch-regexp}' |
| 25 | file-include-regexp: '{all-files-regexp}' |
| 26 | dependency-jobs: '{dependency-jobs}' |
| 27 | |
| 28 | properties: |
| 29 | - cord-infra-properties: |
| 30 | build-days-to-keep: '{build-days-to-keep}' |
| 31 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 32 | |
| 33 | wrappers: |
| 34 | - lf-infra-wrappers: |
| 35 | build-timeout: '{build-timeout}' |
| 36 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 37 | |
| 38 | scm: |
| 39 | - lf-infra-gerrit-scm: |
| 40 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
Zack Williams | 5875087 | 2018-05-07 17:35:45 -0700 | [diff] [blame] | 41 | refspec: '' |
Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 42 | branch: '$GERRIT_BRANCH' |
| 43 | submodule-recursive: 'false' |
Zack Williams | cd3eb20 | 2018-10-02 14:33:13 -0700 | [diff] [blame] | 44 | choosing-strategy: 'gerrit' |
Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 45 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 46 | |
| 47 | node: '{build-node}' |
| 48 | project-type: freestyle |
| 49 | concurrent: false |
| 50 | |
| 51 | builders: |
| 52 | - shell: | |
Zack Williams | 642e5f7 | 2018-06-05 13:24:13 -0700 | [diff] [blame] | 53 | #!/usr/bin/env bash |
Zack Williams | bf4339c | 2018-08-13 07:49:45 -0700 | [diff] [blame] | 54 | set -eu -o pipefail |
Zack Williams | 642e5f7 | 2018-06-05 13:24:13 -0700 | [diff] [blame] | 55 | |
| 56 | # Set up the ssh host keys for the docs host |
| 57 | mkdir -p ~/.ssh |
| 58 | echo '{docs-ssh-host-key}' >> ~/.ssh/known_hosts |
| 59 | |
| 60 | # Setup and build the helm repo |
Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 61 | helm init --client-only |
Zack Williams | 5875087 | 2018-05-07 17:35:45 -0700 | [diff] [blame] | 62 | helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/ |
Zack Williams | bf4339c | 2018-08-13 07:49:45 -0700 | [diff] [blame] | 63 | helm repo add rook-beta https://charts.rook.io/beta |
Zack Williams | a8f3b84 | 2018-05-04 17:21:13 -0700 | [diff] [blame] | 64 | ./scripts/helmrepo.sh |
Zack Williams | 642e5f7 | 2018-06-05 13:24:13 -0700 | [diff] [blame] | 65 | |
| 66 | # Copy repo to host |
Luca Prete | 79bb1ea | 2018-06-04 11:15:51 +0200 | [diff] [blame] | 67 | rsync -rvzh --delete chart_repo/ {docs-ssh-host}:/var/www/charts/$GERRIT_BRANCH |
Zack Williams | 642e5f7 | 2018-06-05 13:24:13 -0700 | [diff] [blame] | 68 | |