Skip to content

Commit

Permalink
Merge pull request #40 from LBGarber/makefile-del-travis
Browse files Browse the repository at this point in the history
Update Makefile for Travis CI removal
  • Loading branch information
LBGarber authored Oct 20, 2021
2 parents 79e9b05 + baf945a commit b8bc07b
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

# Build Arguments
TRAVIS_BRANCH ?= test
TRAVIS_BUILD_NUMBER ?= 9999
TRAVIS_REPO_SLUG ?= linode/docker-volume-linode
REPO_SLUG ?= linode/docker-volume-linode

# Deploy Arguments
DOCKER_USERNAME ?= xxxxx
Expand All @@ -14,24 +12,30 @@ TEST_LABEL ?= xyz

GOPATH=$(shell go env GOPATH)

# e.g: docker-volume-linode:rootfs.30
PLUGIN_NAME_ROOTFS=docker-volume-linode:rootfs.${TRAVIS_BUILD_NUMBER}
PLUGIN_VERSION=v0.15.0

# e.g: docker-volume-linode:master.30
# e.g: docker-volume-linode:v1.1.30
PLUGIN_NAME=${TRAVIS_REPO_SLUG}:${TRAVIS_BRANCH}.${TRAVIS_BUILD_NUMBER}
PLUGIN_NAME_LATEST=${TRAVIS_REPO_SLUG}:latest
PLUGIN_NAME_ROOTFS=docker-volume-linode:rootfs.${PLUGIN_VERSION}
PLUGIN_NAME=${REPO_SLUG}:v0.15.0
PLUGIN_NAME_LATEST=${REPO_SLUG}:latest

PLUGIN_DIR=plugin-contents-dir

export GO111MODULE=on

all: clean build

deploy: docker-login build
# Push images
deploy:
# workaround for plugin
docker plugin rm -f ${PLUGIN_NAME} 2>/dev/null || true
docker plugin create ${PLUGIN_NAME} ./$(PLUGIN_DIR)
docker plugin push ${PLUGIN_NAME}
docker plugin rm -f ${PLUGIN_NAME} 2>/dev/null || true

# load plugin with `latest` tag
docker plugin rm -f ${PLUGIN_NAME_LATEST} 2>/dev/null || true
docker plugin create ${PLUGIN_NAME_LATEST} ./$(PLUGIN_DIR)
docker plugin push ${PLUGIN_NAME_LATEST}
docker plugin rm -f ${PLUGIN_NAME_LATEST} 2>/dev/null || true

docker-login:
# Login to docker
Expand Down

0 comments on commit b8bc07b

Please sign in to comment.