Skip to content

Commit 14b704b

Browse files
authored
change tar.gz to tgz to match helm releaser, add helm for git hash (#51)
For consistency with the release packaging we change the non-release artifacts to tgz extension. We already push images with the commit hash for stability, this also publishes a chart for those tags.
1 parent 502849a commit 14b704b

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ jobs:
7373
- uses: actions/checkout@v4
7474
- name: get tags
7575
run: git fetch --tags origin
76-
- name: Generate helm tarball
76+
- name: Generate hash-version helm tarball (non-release builds only)
77+
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
78+
run: |
79+
short_hash=$(git rev-parse --short=7 HEAD)
80+
make helm REPO=${{ env.REGISTRY }}/${{ env.IMAGE_BASE }} VTAG=g${short_hash}
81+
- name: Generate tagged-version helm tarball
7782
run: make helm REPO=${{ env.REGISTRY }}/${{ env.IMAGE_BASE }} VTAG=${{ needs.build.outputs.VTAG }}
7883
- name: configure git for helm release
7984
run: |
@@ -83,8 +88,8 @@ jobs:
8388
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
8489
run: |
8590
git checkout gh-pages
86-
mv helm/build/sciserver-*.tar.gz .
87-
git add sciserver-*.tar.gz
91+
mv helm/build/sciserver-*.tgz .
92+
git add sciserver-*.tgz
8893
git commit -m "upload development helm charts for ${{ github.ref }}"
8994
git push
9095
- name: swap built helm charts for release builds

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Mainline commits, pull-requests and tagged versions have built artifacts
3131
available on the github container registry with tags matching the version. Helm
3232
charts are likewise published for each of the above to a github pages site at
3333

34-
https://sciserver.github.io/opensciserver/sciserver-{version}.tar.gz
34+
https://sciserver.github.io/opensciserver/sciserver-{version}.tgz
3535

3636
where `{version}` is either a semver version (such as `1.0.0`) for release
3737
installs or `pr-{pr-number}` where `{pr-number}` is the pull request number
@@ -54,14 +54,26 @@ helm -n {namespace} \
5454
--set proxy.cidrWhiteList=0.0.0.0/0 \
5555
--set dev.nopvc=true \
5656
-f https://sciserver.github.io/opensciserver/helm/sciserver/password-manifest.yaml \
57-
https://sciserver.github.io/opensciserver/sciserver-{version}.tar.gz
57+
https://sciserver.github.io/opensciserver/sciserver-{version}.tgz
5858
```
5959

6060
replace `{namespace}`, `{name}` and `{domain-name}` Some options above (such as
6161
the logging api replica count) are there due to incompleteness of this repo, or
6262
needs fixing. Once this is installed, the dashboard will be available at
6363
`https://{domain-name}/{name}`!
6464

65+
### Stable non-release tags
66+
67+
If for any reason it is necessary to install a non-release version, we publish
68+
container images and helm charts tagged with the git commit hash to provide a
69+
stable artifact (e.g. as opposed to `main`).
70+
71+
The helm release for these has the form
72+
`https://sciserver.github.io/opensciserver/sciserver-g{git-short-hash}`, where
73+
`{git-short-hash}` is the first seven characters of the git commit hash (e.g.
74+
`74971a5`, can be found in the commit list on github or using the `git log`
75+
command line tool or similar)
76+
6577
### From a local build of the charts
6678

6779
If you need to modify the charts or want to build them locally for any reason,
@@ -88,7 +100,7 @@ make helm REPO=ghcr.io/sciserver/opensciserver VTAG=main
88100
The above will build the helm chart where images are located in the official
89101
github container registry for opensciserver and we want those built from the
90102
latest commit to main. This will place the zipped chart under
91-
`helm/build/sciserver-{VTAG}.tar.gz`, which can be directly specified to helm as
103+
`helm/build/sciserver-{VTAG}.tgz`, which can be directly specified to helm as
92104
the chart source (see below). To reference a pull request, simply replace `VTAG`
93105
as appropriate (`pr-` plus the pull request number):
94106

helm/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ sed -i="" "s%<<<HELM_CHART_VERSION>>>%${HELM_CHART_VERSION}%" Chart.yaml
2222
rm *=
2323

2424
cd ..
25-
COPYFILE_DISABLE=1 tar -czf sciserver-${VTAG}.tar.gz --no-xattrs sciserver
25+
COPYFILE_DISABLE=1 tar -czf sciserver-${VTAG}.tgz --no-xattrs sciserver

0 commit comments

Comments
 (0)