Skip to content

Commit

Permalink
Merge pull request #1115 from tiewei/fix-contiv-compose
Browse files Browse the repository at this point in the history
Fix contiv compose and update release
  • Loading branch information
tiewei authored Jan 19, 2018
2 parents b40bdf6 + 0e7433c commit 4043693
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
27 changes: 7 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -384,24 +384,11 @@ archive:
-C ../scripts contrib/completion/bash/netctl get-contiv-diags

# build versioned archive of netplugin binaries
tar: compile-with-docker binaries-from-container archive

clean-tar:
@rm -f $(TAR_LOC)/*.$(TAR_EXT)
@rm -f install/v2plugin/v2plugin-*.tar.gz

# do not run directly, use "release" target
release-built-version: tar
TAR_FILENAME=$(TAR_FILENAME) TAR_FILE=$(TAR_FILE) OLD_VERSION=${OLD_VERSION} \
NIGHTLY_RELEASE=${NIGHTLY_RELEASE} scripts/release.sh
@make clean-tar

# The first "release" below is not a target, it is a "target-specific variable"
# and sets (and in this case exports) a variable to the target's environment
# The second release runs make as a subshell but with BUILD_VERSION set
# to write the correct version for assets everywhere
#
tar:
rm -f $(TAR_FILE)
./install/k8s/contiv/contiv-compose use-release -i -v $(BUILD_VERSION) install/k8s/contiv/contiv-base.yaml
$(TAR) -jcf $(TAR_FILE) -C install/k8s/contiv/ .

# GITHUB_USER and GITHUB_TOKEN are needed be set (used by github-release)
release: export BUILD_VERSION=$(shell cat version/CURRENT_VERSION)
release:
@make release-built-version
release: tar
TAR_FILENAME=$(TAR_FILENAME) TAR_FILE=$(TAR_FILE) scripts/release.sh
14 changes: 9 additions & 5 deletions install/k8s/contiv/contiv-compose
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ class ContivComposer(object):

def use_release(self, resource, args):
if args.get('version') is not None:
args['netplugin_img'] = 'contiv/netplugin:%s' % args['use_release']
args['netplugin_img'] = 'contiv/netplugin:%s' % args['version']
args['netplugin_init_img'] = 'contiv/netplugin-init:%s' % args[
'use_release']
args['stat_exporter_img'] = 'contiv/stats:%s' % args['use_release']
'version']
args['stat_exporter_img'] = 'contiv/stats:%s' % args['version']
args['auth_proxy_img'] = 'contiv/auth_proxy:%s' % args[
'use_release']
args['ovs_img'] = 'contiv/ovs:%s' % args['use_release']
'version']
args['ovs_img'] = 'contiv/ovs:%s' % args['version']

def compose(self, args):
if args['target'] not in ('add-systest', 'add-prometheus',
Expand Down Expand Up @@ -213,6 +213,10 @@ class ContivComposer(object):
args['netplugin_img'])
self._update_container_image(resource, 'contiv-netmaster',
args['netplugin_img'])
self._update_container_image(resource, 'contiv-netctl',
args['netplugin_img'])
self._update_container_image(resource, 'contiv-cni',
args['netplugin_img'])
if args.get('netplugin_init_img') is not None:
self._update_container_image(resource, 'contiv-netplugin-init',
args['netplugin_init_img'])
Expand Down

0 comments on commit 4043693

Please sign in to comment.