Skip to content

Commit

Permalink
refactor: some scripts directory (#159)
Browse files Browse the repository at this point in the history
* refactor: some test scripts

* chore: bump greptimedb-operator image to v0.1.0-alpha.29
  • Loading branch information
daviderli614 authored Aug 20, 2024
1 parent 2e0eecf commit a30bb2f
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 102 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
with:
wait: 120s

- name: Deploy greptimedb-cluster chart
- name: Deploy greptimedb-cluster
if: ${{ github.event.inputs.chart == 'greptimedb-cluster' }}
shell: bash
run: |
./scripts/deploy-greptimedb-cluster.sh
make e2e-greptimedb-cluster
- name: Deploy greptimedb-standalone chart
- name: Deploy greptimedb-standalone
if: ${{ github.event.inputs.chart == 'greptimedb-standalone' }}
shell: bash
run: |
./scripts/deploy-greptimedb-standalone.sh
make e2e-greptimedb-standalone
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ check-docs: docs ## Check docs
(echo "Need to update documentation, please run 'make docs'"; \
exit 1)

.PHONY: e2e-greptimedb-cluster
e2e-greptimedb-cluster: ## Run greptimedb-cluster e2e tests
./scripts/e2e/greptimedb-cluster.sh

.PHONY: e2e-greptimedb-standalone
e2e-greptimedb-standalone: ## Run greptimedb-standalone e2e tests
./scripts/e2e/greptimedb-standalone.sh

.PHONY: e2e
e2e: ## Run e2e tests
./scripts/deploy-greptimedb-cluster.sh
./scripts/deploy-greptimedb-standalone.sh
./scripts/e2e/greptimedb-cluster.sh
./scripts/e2e/greptimedb-standalone.sh

.PHONY: update-crds
update-crds: ## Run update crd
Expand All @@ -45,7 +53,7 @@ check-crds: update-crds ## Check crd
# For example: make update-chart CHART=${CHART_NAME} VERSION=${IMAGE_TAG}
# make update-chart CHART=greptimedb-standalone VERSION=v0.7.2
# make update-chart CHART=greptimedb-cluster VERSION=v0.7.2
# make update-chart CHART=greptimedb-operator VERSION=0.1.0-alpha.23 # [the greptimedb-operator image tag not have 'v' prefix]
# make update-chart CHART=greptimedb-operator VERSION=v0.1.0-alpha.28
.PHONY: update-chart
update-chart: ## Run update chart
./scripts/update-chart.sh $(CHART) $(VERSION)
4 changes: 2 additions & 2 deletions charts/greptimedb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
kubeVersion: ">=1.18.0-0"
description: The greptimedb-operator Helm chart for Kubernetes.
name: greptimedb-operator
appVersion: 0.1.0-alpha.28
version: 0.2.1
appVersion: 0.1.0-alpha.29
version: 0.2.2
type: application
home: https://github.com/GreptimeTeam/greptimedb-operator
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/greptimedb-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The greptimedb-operator Helm chart for Kubernetes.

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.28](https://img.shields.io/badge/AppVersion-0.1.0--alpha.28-informational?style=flat-square)
![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.29](https://img.shields.io/badge/AppVersion-0.1.0--alpha.29-informational?style=flat-square)

## Source Code

Expand Down Expand Up @@ -108,7 +108,7 @@ Kubernetes: `>=1.18.0-0`
| image.pullSecrets | list | `[]` | The image pull secrets |
| image.registry | string | `"docker.io"` | The image registry |
| image.repository | string | `"greptime/greptimedb-operator"` | The image repository |
| image.tag | string | `"0.1.0-alpha.28"` | The image tag |
| image.tag | string | `"v0.1.0-alpha.29"` | The image tag |
| nameOverride | string | `""` | String to partially override release template name |
| nodeSelector | object | `{}` | The operator node selector |
| rbac.create | bool | `true` | Install role based access control |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13356,6 +13356,19 @@ spec:
type: string
cachePath:
type: string
gcs:
properties:
bucket:
type: string
endpoint:
type: string
root:
type: string
scope:
type: string
secretName:
type: string
type: object
oss:
properties:
bucket:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2729,6 +2729,19 @@ spec:
type: string
cachePath:
type: string
gcs:
properties:
bucket:
type: string
endpoint:
type: string
root:
type: string
scope:
type: string
secretName:
type: string
type: object
oss:
properties:
bucket:
Expand Down
2 changes: 1 addition & 1 deletion charts/greptimedb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
# -- The image pull policy for the controller
imagePullPolicy: IfNotPresent
# -- The image tag
tag: 0.1.0-alpha.28
tag: v0.1.0-alpha.29
# -- The image pull secrets
pullSecrets: []

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
83 changes: 0 additions & 83 deletions scripts/setup-e2e-env.sh

This file was deleted.

8 changes: 1 addition & 7 deletions scripts/update-chart.sh → scripts/update/update-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ function update_chart() {
patch=$(echo "$current_version" | awk -F. '{print $3}')

next_version="$major.$minor.$((patch + 1))"

if [[ "$CHART" == "greptimedb-operator" ]]; then
# The greptimedb-operator image tag not have 'v' prefix.
appVersion=$VERSION
else
appVersion=${VERSION#v}
fi
appVersion=${VERSION#v}

yq eval ".appVersion = \"$appVersion\"" -i "$chart_file"
yq eval ".version = \"$next_version\"" -i "$chart_file"
Expand Down

0 comments on commit a30bb2f

Please sign in to comment.