-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from makeplane/develop
Promoting Develop to Master
- Loading branch information
Showing
27 changed files
with
604 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,15 @@ name: Chart Release | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
plane-ce: | ||
description: 'Build Plane CE' | ||
type: boolean | ||
default: false | ||
plane-ee: | ||
description: 'Build Plane EE' | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
CR_CONFIGFILE: "${{ github.workspace }}/cr.yaml" | ||
|
@@ -14,9 +23,13 @@ env: | |
TARGET_BRANCH: "${{ github.ref_name }}" | ||
CHART_NAME_CE: "plane-ce" | ||
CHART_NAME_ENTERPRISE: "plane-enterprise" | ||
MARK_AS_LATEST: true | ||
MARK_AS_PRERELASE: false | ||
PAGES_INDEX_PATH: "" | ||
|
||
jobs: | ||
setup: | ||
if: ${{ github.event.inputs.plane-ce == 'true' || github.event.inputs.plane-ee == 'true' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
@@ -60,20 +73,41 @@ jobs: | |
chmod 400 ${{env.GNUPGHOME}}/secring.gpg | ||
- name: Remove unwanted charts | ||
run: | | ||
if [ "${{ github.event.inputs.plane-ce }}" = "false" ]; then | ||
rm -rf charts/${{ env.CHART_NAME_CE }} | ||
fi | ||
if [ "${{ github.event.inputs.plane-ee }}" = "false" ]; then | ||
rm -rf charts/${{ env.CHART_NAME_ENTERPRISE }} | ||
fi | ||
- name: Rename Chart | ||
if: github.ref_name != 'master' | ||
run: | | ||
flatBranchName=$(echo "${{ env.TARGET_BRANCH }}" | sed 's/\//\-/g') | ||
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml | ||
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml | ||
if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then | ||
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml | ||
fi | ||
if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then | ||
sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml | ||
fi | ||
echo "MARK_AS_LATEST=false" >> $GITHUB_ENV | ||
echo "MARK_AS_PRERELASE=true" >> $GITHUB_ENV | ||
echo "PAGES_INDEX_PATH=${flatBranchName}" >> $GITHUB_ENV | ||
- name: Release Charts | ||
uses: helm/[email protected].0 | ||
uses: mguptahub/[email protected].2 | ||
with: | ||
charts_dir: charts | ||
config: cr.yaml | ||
packages_with_index: false | ||
skip_existing: true | ||
mark_as_latest: ${{ env.MARK_AS_LATEST }} | ||
prerelease: ${{ env.MARK_AS_PRERELASE }} | ||
pages_index_path: ${{ env.PAGES_INDEX_PATH }} | ||
env: | ||
CR_TOKEN: ${{ env.CR_TOKEN }} | ||
CR_KEY: ${{ env.GPG_KEY_NAME }} | ||
|
@@ -82,7 +116,7 @@ jobs: | |
CR_SIGN: true | ||
|
||
- id: publish-plane-enterprise | ||
if: github.ref_name == 'master' | ||
if: ${{ github.ref_name == 'master' && github.event.inputs.plane-ee == 'true' }} | ||
name: Harbor Publish Plane-Enterprise | ||
env: | ||
CHART_REPO: ${{ env.CHART_NAME_ENTERPRISE }} | ||
|
@@ -125,14 +159,23 @@ jobs: | |
- name: Copy Readme | ||
run: | | ||
cp code/charts/plane-ce/README.md pages/content/plane-ce.md | ||
cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md | ||
if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then | ||
cp code/charts/plane-ce/README.md pages/content/plane-ce.md | ||
fi | ||
if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then | ||
cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md | ||
fi | ||
- name: Publish pages | ||
working-directory: pages | ||
run: | | ||
git add . | ||
git commit -m "Updated READMEs" | ||
git push | ||
if git diff-index --quiet HEAD --; then | ||
echo "No changes to commit" | ||
else | ||
# Commit and push the changes | ||
git commit -m "Updated READMEs" | ||
git push | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Plane CE Helm Chart | ||
|
||
## Pre-requisite | ||
|
||
- A working Kubernetes cluster | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .Values.rabbitmq.local_setup }} | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ .Release.Name }}-rabbitmq-secrets | ||
data: | ||
RABBITMQ_DEFAULT_USER: {{ .Values.rabbitmq.default_user | default "plane" | b64enc | quote }} | ||
RABBITMQ_DEFAULT_PASS: {{ .Values.rabbitmq.default_password | default "plane" | b64enc |quote }} | ||
--- | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
charts/plane-ce/templates/workloads/rabbitmq.stateful.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{{- if .Values.rabbitmq.local_setup }} | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ .Release.Name }}-rabbitmq | ||
labels: | ||
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq | ||
spec: | ||
{{- if not .Values.rabbitmq.assign_cluster_ip }} | ||
clusterIP: None | ||
{{- end }} | ||
ports: | ||
- name: rabbitmq-{{ .Values.rabbitmq.servicePort }} | ||
port: {{ .Values.rabbitmq.servicePort }} | ||
protocol: TCP | ||
targetPort: 5672 | ||
- name: rabbitmq-mgmt-{{ .Values.rabbitmq.managementPort }} | ||
port: {{ .Values.rabbitmq.managementPort }} | ||
protocol: TCP | ||
targetPort: 15672 | ||
selector: | ||
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ .Release.Name }}-rabbitmq-wl | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq | ||
serviceName: {{ .Release.Name }}-rabbitmq | ||
template: | ||
metadata: | ||
labels: | ||
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq | ||
spec: | ||
containers: | ||
- image: {{ .Values.rabbitmq.image }} | ||
imagePullPolicy: {{ .Values.rabbitmq.pullPolicy | default "IfNotPresent" | quote }} | ||
name: {{ .Release.Name }}-rabbitmq | ||
stdin: true | ||
tty: true | ||
envFrom: | ||
- secretRef: | ||
name: {{ .Release.Name }}-rabbitmq-secrets | ||
optional: false | ||
volumeMounts: | ||
- mountPath: /var/lib/rabbitmq | ||
name: pvc-{{ .Release.Name }}-rabbitmq-vol | ||
subPath: '' | ||
serviceAccount: {{ .Release.Name }}-srv-account | ||
serviceAccountName: {{ .Release.Name }}-srv-account | ||
volumeClaimTemplates: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
creationTimestamp: null | ||
namespace: {{ .Release.Namespace }} | ||
name: pvc-{{ .Release.Name }}-rabbitmq-vol | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{ .Values.rabbitmq.volumeSize | default "100Mi" | quote }} | ||
storageClassName: {{ .Values.rabbitmq.storageClass }} | ||
volumeMode: Filesystem | ||
|
||
{{- end }} |
Oops, something went wrong.