Skip to content

Commit

Permalink
fix script that gets the runtime def location (#633)
Browse files Browse the repository at this point in the history
* fix script that gets the runtime def location

* remove unused targets
  • Loading branch information
danielm-codefresh authored Nov 7, 2022
1 parent 0a0a848 commit b41448b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ cli-local: $(OUT_DIR)/$(CLI_NAME)-$(shell go env GOOS)-$(shell go env GOARCH)
@ln $(OUT_DIR)/$(CLI_NAME)-$(shell go env GOOS)-$(shell go env GOARCH) /usr/local/bin/$(CLI_NAME)-dev

.PHONY: cli-e2e
cli-e2e: cli-package

.PHONY: cli-package
cli-package: $(OUT_DIR)/$(CLI_NAME)-$(shell go env GOOS)-$(shell go env GOARCH)
cli-e2e: $(OUT_DIR)/$(CLI_NAME)-$(shell go env GOOS)-$(shell go env GOARCH)
@cp $(OUT_DIR)/$(CLI_NAME)-$(shell go env GOOS)-$(shell go env GOARCH) $(OUT_DIR)/$(CLI_NAME)

$(OUT_DIR)/$(CLI_NAME)-linux-amd64: GO_FLAGS='GOOS=linux GOARCH=amd64 CGO_ENABLED=0'
Expand Down Expand Up @@ -175,8 +172,3 @@ $(GOBIN)/golangci-lint:
@mkdir dist || true
@echo installing: golangci-lint
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.50.1

.PHONY: e2e-local-manifests
e2e-local-manifests:
cat /codefresh/volume/cli-v2/manifests/runtime.yaml | sed '[email protected]/codefresh-io/cli-v2/@/codefresh/volume/cli-v2/@' > /tmp/tmp_runtime.yaml
mv /tmp/tmp_runtime.yaml manifests/runtime.yaml
6 changes: 4 additions & 2 deletions hack/get-manifests-location.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REPO="https://github.com/codefresh-io/csdp-official"
BRANCH="$1"

DEFAULT_MANIFESTS_LOCATION="https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml"
CUSTOM_MANIFESTS_LOCATION="https://github.com/codefresh-io/csdp-official/csdp/hybrid/basic/runtime.yaml?ref=$BRANCH"
RUNTIME_DEFINITION_URL="https://raw.githubusercontent.com/codefresh-io/csdp-official/$BRANCH/csdp/hybrid/basic/runtime.yaml"

git ls-remote --heads ${REPO} ${BRANCH} | grep ${BRANCH} >/dev/null

Expand All @@ -14,4 +14,6 @@ if [ "$?" == "1" ]; then
exit 0
fi

echo "$CUSTOM_MANIFESTS_LOCATION"
RUNTIME_DEFINITION_FILE="/codefresh/volume/runtime.yaml"
curl --silent "$RUNTIME_DEFINITION_URL" | yq "(.spec.components[] | select(.type == \"kustomize\") | .url) += \"?ref=$BRANCH\"" | yq ".spec.bootstrapSpecifier += \"?ref=$BRANCH\"" >$RUNTIME_DEFINITION_FILE
echo $RUNTIME_DEFINITION_FILE

0 comments on commit b41448b

Please sign in to comment.