Skip to content

Commit

Permalink
fix(makefile): fix release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed May 4, 2018
1 parent ad6d08c commit 4a9d9bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 27 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,15 @@ $(CMDS): .FORCE
go build -o $@ $(PKG)/cmd/$(shell basename $@)

OCS_CATALOG_CHART:=deploy/chart/templates/08-tectonicocs.configmap.yaml
OCS_CATALOG_RELEASE:=catalog_resources/ocs/tectonicocs.configmap.yaml

COMPONENT_CATALOG_CHART:=deploy/chart/templates/09-tectoniccomponents.configmap.yaml
COMPONENT_CATALOG_RELEASE:=catalog_resources/ocs/tectoniccomponents.configmap.yaml

$(OCS_CATALOG_CHART) $(OCS_CATALOG_RELEASE): .FORCE catalog_resources/ocs/*.crd.yaml \
$(OCS_CATALOG_CHART): .FORCE catalog_resources/ocs/*.crd.yaml \
catalog_resources/ocs/*.clusterserviceversion.yaml \
catalog_resources/ocs/*.package.yaml
. ./scripts/build_catalog_configmap.sh catalog_resources/ocs 'tectonic-ocs' $@

$(COMPONENT_CATALOG_CHART) $(COMPONENT_CATALOG_RELEASE): .FORCE catalog_resources/components/*.crd.yaml \
$(COMPONENT_CATALOG_CHART): .FORCE catalog_resources/components/*.crd.yaml \
catalog_resources/components/*.clusterserviceversion.yaml \
catalog_resources/components/*.package.yaml
. ./scripts/build_catalog_configmap.sh catalog_resources/components 'tectonic-components' $@
Expand All @@ -72,7 +70,9 @@ $(MANIFESTS): $(CHARTS) build/chart/Chart.yaml build/chart/values.yaml \
Documentation/install/local-values.yaml
mkdir -p build/resources
helm template -n olm -f Documentation/install/local-values.yaml \
-x templates/$(shell basename $@) build/chart > $@
-x templates/$(shell basename $@) build/chart --output-dir $@



rc: $(OCS_CATALOG_CHART) $(COMPONENT_CATALOG_CHART) $(MANIFESTS)

Expand Down Expand Up @@ -168,5 +168,4 @@ make gen-all: gen-ci codegen generate-mock-client

# make ver=0.3.0 release
make release: $(OCS_CATALOG_RELEASE) $(COMPONENT_CATALOG_RELEASE)
mkdir -p build/tectonic-alm-operator/manifests/$(ver)
./scripts/package-release.sh $(ver) build/tectonic-alm-operator/manifests/$(ver) deploy/tectonic-alm-operator/values.yaml
./scripts/package-release.sh $(ver) deploy/tectonic-alm-operator/manifests/$(ver) deploy/tectonic-alm-operator/values.yaml
2 changes: 1 addition & 1 deletion alm-ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN make vendor

# Build bin
COPY . .
RUN make build && cp bin/alm /bin/alm
RUN make clean build && cp bin/alm /bin/alm

EXPOSE 8080
CMD ["/bin/alm"]
2 changes: 1 addition & 1 deletion deploy/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: alm
name: olm
9 changes: 0 additions & 9 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,3 @@ catalog:
pullPolicy: Always
service:
internalPort: 8080

servicebroker:
replicaCount: 1
image:
ref: quay.io/coreos/alm-service-broker:master
pullPolicy: Always
service:
internalPort: 8080
brokerPort: 8005
13 changes: 4 additions & 9 deletions scripts/package-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ echo "version: $1" >> ${charttmpdir}/Chart.yaml

mkdir ${chartdir}

pushd ${charttmpdir}/templates
filenames=$(ls *.yaml)
popd

for f in ${filenames}
do
echo "Processing $f file..."
helm template -n alm -f ${values} -x templates/${f} ${charttmpdir} > ${chartdir}/${f}
done
helm template -n olm -f ${values} ${charttmpdir} --output-dir ${charttmpdir}

cp -R ${charttmpdir}/olm/templates/ ${chartdir}

0 comments on commit 4a9d9bb

Please sign in to comment.