-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (68 loc) · 2.93 KB
/
build-chart-jfrog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build and Bundle Jfrog Helm chart
on:
workflow_dispatch:
inputs:
jfrog_project:
description: 'Name of the jfrog project to deploy the chart to'
required: true
default: 'ecosystem'
chart_name:
description: 'Name of the chart to build'
required: true
default: 'aerospike-vector-search'
repo_name:
description: 'Name of the jfrog repo to deploy the chart to'
required: true
default: 'ecosystem-helm-dev-local'
chart_version:
description: 'Build number to use for the build metadata'
required: true
default: '0.7.0'
env:
JF_PROJECT: ${{ github.event.inputs.jfrog_project }}
JF_REPO: ${{ github.event.inputs.repo_name }}
CHART_VERSION: ${{ github.event.inputs.chart_version }}
CHART_NAME: ${{ github.event.inputs.chart_name }}
jobs:
build-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v3
# You can sign helm charts but not doing this for now
# - name: setup GPG
# uses: aerospike/shared-workflows/devops/setup-gpg@main
# with:
# gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
# gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }}
# gpg-key-pass: ${{ secrets.GPG_PASS }}
# gpg-key-name: "aerospike-inc"
- name: setup jfrog
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: https://aerospike.jfrog.io
JF_ACCESS_TOKEN: ${{ secrets.JF_ECO_CONTRIB_TOKEN }}
JF_PROJECT: ${{ github.event.inputs.jfrog_project }}
- name: "Deploy helm to JFrog"
run: |
helm package $CHART_NAME
jf rt u "${{env.CHART_NAME}}-${{env.CHART_VERSION}}.tgz" "${{env.JF_REPO}}/${{env.CHART_NAME}}/${{env.CHART_VERSION}}/" \
--build-name="${{env.CHART_NAME}}-helm" --build-number="${{env.CHART_VERSION}}" --project="${{env.JF_PROJECT}}"
jf rt build-collect-env "${{env.CHART_NAME}}-helm" "${{env.CHART_VERSION}}"
jf rt build-add-git "${{env.CHART_NAME}}-helm" "${{env.CHART_VERSION}}"
jf rt build-publish "${{env.CHART_NAME}}-helm" "${{env.CHART_VERSION}}" --project="${{env.JF_PROJECT}}"
- name: Create release bundle
run: |
echo '{
"name": "${{ env.CHART_NAME }}-helm",
"version": "${{ env.CHART_VERSION }}",
"files": [
{
"project": "${{ env.JF_PROJECT }}",
"build": "${{ env.CHART_NAME }}-helm/${{ env.CHART_VERSION }}"
}
]
}' > release-bundle-spec.json
cat release-bundle-spec.json
jf release-bundle-create "${{ env.CHART_NAME }}-release-bundle" "${{ env.CHART_VERSION }}" \
--spec release-bundle-spec.json --project="${{ env.JF_PROJECT }}" --signing-key="aerospike"