Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
fix(Makefile/brigade.js): fix the 'command: command not found' instances
Browse files Browse the repository at this point in the history
 - switch to `which` for binary detection
  • Loading branch information
vdice committed Nov 26, 2018
1 parent c4040b6 commit 363ad0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ifeq ($(OS),Windows_NT)
else
TARGET = $(PROJECT)
SHELL ?= bash
CHECK = command -v
CHECK ?= which
endif

GIT_TAG := $(shell git describe --tags --always)
Expand Down
16 changes: 11 additions & 5 deletions brigade.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function build(e, project) {

// Set a few environment variables.
build.env = {
"DEST_PATH": localPath,
"GOPATH": gopath
DEST_PATH: localPath,
GOPATH: gopath
};

// Run Go unit tests
Expand Down Expand Up @@ -175,8 +175,8 @@ function goDockerBuild(e, p) {

goDockerBuild.storage.enabled = true;
goDockerBuild.env = {
"DEST_PATH": localPath,
"GOPATH": gopath
DEST_PATH: localPath,
GOPATH: gopath
};
goDockerBuild.tasks = [
"cd /src",
Expand All @@ -199,14 +199,20 @@ function dockerhubPublish(project, tag) {
let dockerRegistry = project.secrets.dockerhubRegistry || "docker.io";
let dockerOrg = project.secrets.dockerhubOrg || "deis";

publisher.env = {
SHELL: "/bin/sh",
DOCKER_REGISTRY: dockerOrg,
VERSION: tag
}

publisher.docker.enabled = true;
publisher.storage.enabled = true;
publisher.tasks = [
"apk add --update --no-cache make",
`docker login ${dockerRegistry} -u ${project.secrets.dockerhubUsername} -p ${project.secrets.dockerhubPassword}`,
"cd /src",
"cp -av /mnt/brigade/share/bin ./",
`SHELL=/bin/sh DOCKER_REGISTRY=${dockerOrg} VERSION=${tag} make docker-build docker-push`,
`make docker-build docker-push`,
`docker logout ${dockerRegistry}`
];

Expand Down

0 comments on commit 363ad0a

Please sign in to comment.