Skip to content

Commit

Permalink
Unifying release assets names (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cortey authored Aug 11, 2023
1 parent d0a2433 commit 07c44f8
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ module-chart-test
mod
charts
default.yaml
template.yaml
template-k3d.yaml
moduletemplate.yaml
moduletemplate-k3d.yaml
docs/.DS_Store
.DS_Store
__debug_bin
Expand All @@ -43,4 +43,4 @@ vendor
serverless-operator.yaml
manifests/serverless/rendered.yaml
serverless.yaml
template-latest.yaml
moduletemplate-latest.yaml
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ module-image: docker-build docker-push ## Build the Module Image and push it to
.PHONY: module-build
module-build: kyma kustomize ## Build the Module and push it to a registry defined in MODULE_REGISTRY.
cd config/operator && $(KUSTOMIZE) edit set image controller=${IMG}
@$(KYMA) alpha create module --default-cr=config/samples/operator_v1alpha1_serverless.yaml \
@$(KYMA) alpha create module --default-cr=config/samples/default_serverless_cr.yaml \
--channel=${MODULE_CHANNEL} --name kyma.project.io/module/$(MODULE_NAME) \
--version $(MODULE_VERSION) --path . $(MODULE_CREATION_FLAGS) \
--output=template.yaml
--output=moduletemplate.yaml

##@ Build Dependencies

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/lat
To get Serverless installed, apply the sample Serverless CR:

```bash
kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml
kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/latest/download/default_serverless_cr.yaml
```

## Development
Expand Down Expand Up @@ -87,13 +87,13 @@ kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml
- Create a Serverless instance.

```bash
kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml
kubectl apply -f config/samples/default_serverless_cr.yaml
```

- Delete a Serverless instance.

```bash
kubectl delete -f config/samples/operator_v1alpha1_serverless.yaml
kubectl delete -f config/samples/default_serverless_cr.yaml
```

- Use external registry.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/ui-extensions/serverless/general
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ features:
disableCreate: true
disableDelete: true
description: >-
{{[Serverless CR](https://github.com/kyma-project/serverless-manager/blob/main/config/samples/operator_v1alpha1_serverless.yaml)}}
{{[Serverless CR](https://github.com/kyma-project/serverless-manager/blob/main/config/samples/default_serverless_cr.yaml)}}
specifies serverless module.
4 changes: 2 additions & 2 deletions docs/contributor/manual-installation-on-k3d.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
> **NOTE:** The following sub-steps are temporary workarounds.
Edit `template.yaml` under the `config/moduletemplates` folder and:
Edit `moduletemplate.yaml` under the `config/moduletemplates` folder and:
- change `target` to `control-plane`
Expand Down Expand Up @@ -69,7 +69,7 @@
Use the `--template` flag to deploy the Serverless module manifest from the beginning, or apply it using kubectl later.
```bash
kyma alpha deploy --templates=./config/moduletemplates/template.yaml
kyma alpha deploy --templates=./config/moduletemplates/moduletemplate.yaml
```
Kyma installation is ready, but the module is not yet activated.
Expand Down
6 changes: 3 additions & 3 deletions hack/ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module-build: ## Build the Module, push it to a registry and print it based on t
MODULE_VERSION=${MODULE_VERSION}-${MODULE_SHA}

@echo "\n~~~~~~~~~~~~BEGINING OF MODULE TEMPLATE~~~~~~~~~~~~~~"
@cat ${PROJECT_ROOT}/template.yaml
@cat ${PROJECT_ROOT}/moduletemplate.yaml
@echo "\n~~~~~~~~~~~~~~~END OF MODULE TEMPLATE~~~~~~~~~~~~~~~~"

##@ Tests
Expand Down Expand Up @@ -68,8 +68,8 @@ remove-serverless: ## Remove Serverless CR
.PHONY: install-latest-serverless
install-latest-serverless:
@make -C ${PROJECT_COMMON} kyma create-k3d
curl -LJ -s https://github.com/kyma-project/serverless-manager/releases/latest/download/moduletemplate.yaml > ${PROJECT_ROOT}/template-latest.yaml
@cat ${PROJECT_ROOT}/template-latest.yaml | sed -e 's/enableInternal: true/enableInternal: false/g' > ${PROJECT_ROOT}/template-k3d.yaml
curl -LJ -s https://github.com/kyma-project/serverless-manager/releases/latest/download/moduletemplate.yaml > ${PROJECT_ROOT}/moduletemplate-latest.yaml
@cat ${PROJECT_ROOT}/moduletemplate-latest.yaml | sed -e 's/enableInternal: true/enableInternal: false/g' > ${PROJECT_ROOT}/moduletemplate-k3d.yaml
@make -C ${PROJECT_COMMON} install-kyma-with-lm patch-mod-mgr-role install-module-template enable-module verify-kyma

.PHONY: reinstall-serverless
Expand Down
12 changes: 6 additions & 6 deletions hack/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OPERATOR_IMAGE_NAME ?= serverless-operator-dev-local
OPERATOR_IMAGE_TAG ?= $(MODULE_VERSION)


TEMPLATE_PATH ?= ${PROJECT_ROOT}/template.yaml
TEMPLATE_PATH ?= ${PROJECT_ROOT}/moduletemplate.yaml

KYMA ?= ${PROJECT_ROOT}/bin/kyma-unstable

Expand Down Expand Up @@ -91,21 +91,21 @@ install-kyma-with-lm:

.PHONY: install-module-template
install-module-template: ## Apply k3d-ready moduletemplate.
kubectl apply -f ${PROJECT_ROOT}/template-k3d.yaml
kubectl apply -f ${PROJECT_ROOT}/moduletemplate-k3d.yaml


.PHONY: fix-template
fix-template: ## Create template-k3d.yaml based on template.yaml with right URLs.
@cat ${PROJECT_ROOT}/template.yaml \
fix-template: ## Create moduletemplate-k3d.yaml based on moduletemplate.yaml with right URLs.
@cat ${PROJECT_ROOT}/moduletemplate.yaml \
| sed -e 's/remote/control-plane/g' \
-e 's/${REGISTRY_PORT}/5000/g' \
-e 's/localhost/k3d-${REGISTRY_NAME}.localhost/g' \
> ${PROJECT_ROOT}/template-k3d.yaml
> ${PROJECT_ROOT}/moduletemplate-k3d.yaml

.PHONY: apply-serverless
apply-serverless: ## Apply the k3d serverless CR.
kubectl apply -n kyma-system \
-f ${PROJECT_ROOT}/config/samples/operator_v1alpha1_serverless.yaml
-f ${PROJECT_ROOT}/config/samples/default_serverless_cr.yaml

### Internal Dependencies

Expand Down
10 changes: 6 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cat serverless-operator.yaml

MODULE_VERSION=${PULL_BASE_REF} make module-build

echo "Generated template.yaml:"
cat template.yaml
echo "Generated moduletemplate.yaml:"
cat moduletemplate.yaml

echo "Updating github release with assets"

Expand All @@ -65,7 +65,9 @@ fi
UPLOAD_URL="https://uploads.github.com/repos/kyma-project/serverless-manager/releases/${RELEASE_ID}/assets"

uploadFile "serverless-operator.yaml" "${UPLOAD_URL}?name=serverless-operator.yaml"
uploadFile "template.yaml" "${UPLOAD_URL}?name=template.yaml"
uploadFile "config/samples/operator_v1alpha1_serverless.yaml" "${UPLOAD_URL}?name=operator_v1alpha1_serverless.yaml"
uploadFile "moduletemplate.yaml" "${UPLOAD_URL}?name=moduletemplate.yaml"
uploadFile "config/samples/default_serverless_cr.yaml" "${UPLOAD_URL}?name=default_serverless_cr.yaml"
uploadFile "config/samples/default_serverless_cr_k3d.yaml" "${UPLOAD_URL}?name=default_serverless_cr_k3d.yaml"



0 comments on commit 07c44f8

Please sign in to comment.