Skip to content

Commit

Permalink
fix use of working directories in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
rawlingsj committed Mar 18, 2019
1 parent f9bcebe commit 3cec980
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,22 @@ sleep:

release: check
rm -rf build release && mkdir build release
# for os in linux darwin ; do \
# CGO_ENABLED=$(CGO_ENABLED) GOOS=$$os GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/$$os/$(NAME) cmd/jx/jx.go ; \
# done
# CGO_ENABLED=$(CGO_ENABLED) GOOS=windows GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/$(NAME)-windows-amd64.exe cmd/jx/jx.go
# zip --junk-paths release/$(NAME)-windows-amd64.zip build/$(NAME)-windows-amd64.exe README.md LICENSE
# CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=arm $(GO) build $(BUILDFLAGS) -o build/arm/$(NAME) cmd/jx/jx.go
for os in linux darwin ; do \
CGO_ENABLED=$(CGO_ENABLED) GOOS=$$os GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/$$os/$(NAME) cmd/jx/jx.go ; \
done
CGO_ENABLED=$(CGO_ENABLED) GOOS=windows GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/$(NAME)-windows-amd64.exe cmd/jx/jx.go
zip --junk-paths release/$(NAME)-windows-amd64.zip build/$(NAME)-windows-amd64.exe README.md LICENSE
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=arm $(GO) build $(BUILDFLAGS) -o build/arm/$(NAME) cmd/jx/jx.go

CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/linux/$(NAME) cmd/jx/jx.go
# CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 $(GO) build $(BUILDFLAGS) -o build/linux/$(NAME) cmd/jx/jx.go

# chmod +x build/darwin/$(NAME)
chmod +x build/darwin/$(NAME)
chmod +x build/linux/$(NAME)
# chmod +x build/arm/$(NAME)
chmod +x build/arm/$(NAME)

# cd ./build/darwin; tar -zcvf ../../release/jx-darwin-amd64.tar.gz jx
cd ./build/darwin; tar -zcvf ../../release/jx-darwin-amd64.tar.gz jx
cd ./build/linux; tar -zcvf ../../release/jx-linux-amd64.tar.gz jx
# cd ./build/arm; tar -zcvf ../../release/jx-linux-arm.tar.gz jx
cd ./build/arm; tar -zcvf ../../release/jx-linux-arm.tar.gz jx

go get -u github.com/progrium/gh-release
gh-release checksums sha256
Expand Down
12 changes: 5 additions & 7 deletions charts/jx/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := jx
OS := $(shell uname)
GITHUB_ACCESS_TOKEN := $(shell cat /builder/home/git-token 2> /dev/null)
CHARTMUSEUM_CREDS_USR := $(shell cat /builder/home/basic-auth-user 2> /dev/null)
CHARTMUSEUM_CREDS_PSW := $(shell cat /builder/home/basic-auth-pass 2> /dev/null)

Expand Down Expand Up @@ -29,15 +28,14 @@ clean:
release: setup clean build

ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(VERSION)/" Chart.yaml
sed -i "" -e "s/tag:.*/tag: $(VERSION)/" values.yaml
sed -i "" -e "s/version:.*/version: $(VERSION)/" charts/jx/Chart.yaml
sed -i "" -e "s/tag:.*/tag: $(VERSION)/" charts/jx/values.yaml

else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" Chart.yaml
sed -i -e "s/tag:.*/tag: $(VERSION)/" values.yaml
sed -i -e "s/version:.*/version: $(VERSION)/" charts/jx/Chart.yaml
sed -i -e "s/tag:.*/tag: $(VERSION)/" charts/jx/values.yaml
endif

helm package .
curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(VERSION).tgz" $(CHART_REPO)/api/charts
rm -rf ${NAME}*.tgz

rm -rf ${NAME}*.tgz
10 changes: 3 additions & 7 deletions jenkins-x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,14 @@ pipelineConfig:
command: /kaniko/executor
args: ['--dockerfile=/workspace/workspace/Dockerfile','--destination=docker.io/jenkinsxio/jx:${inputs.params.version}','--context=/workspace/workspace','--cache-dir=/workspace']

- name: release-chart
options:
workspace: charts/jx
steps:
- name: release-charts
image: gcr.io/jenkinsxio/builder-maven:0.1.286
image: gcr.io/jenkinsxio/builder-go:0.1.289
command: make
args:
- "release"
- -f
- /workspace/workspace/charts/jx/Makefile

- name: update-downstream
steps:
- name: update-downstream
image: gcr.io/jenkinsxio/builder-maven:0.1.286
command: ./jx/scripts/update-downstream.sh

0 comments on commit 3cec980

Please sign in to comment.