Skip to content

Commit

Permalink
1.ワークロードIDおよびコンポーネントIDを指定できるように修正
Browse files Browse the repository at this point in the history
2.推奨、オプションのコマンドラインオプションを指定できるように修正
  • Loading branch information
hisao07 committed Oct 21, 2019
1 parent 9916822 commit 6368440
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
.vagrant
/cookbooks

# Bundler
bin/*
.bundle/*

.kitchen/
.kitchen.local.yml
.vagrant
/cookbooks
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~

# Bundler
Gemfile.lock
gems.locked
bin/*
.bundle/*

# test kitchen
.kitchen/
.kitchen.local.yml

# Chef
Berksfile.lock
.zero-knife.rb
Policyfile.lock.json
32 changes: 32 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Attribute Name:: visualstudio2017
# Recipe:: default
#
# Copyright 2018, SYF
#
# All rights reserved - Do Not Redistribute
#

default['visualstudio2017'] = {
installPath: nil,
edition: 'community',
enterprise: {
url: 'https://download.visualstudio.microsoft.com/download/pr/11669044/52257ee3e96d6e07313e41ad155b155a/vs_Enterprise.exe',
checksum: '49c985297afde1a312cdf3d11b9c7521f93fb0300a448b6c0bd649082ff0c042',
productKey: '',
},
professional: {
url: 'https://download.visualstudio.microsoft.com/download/pr/11669031/14dd70405e8244481b35017b9a562edd/vs_Professional.exe',
checksum: '26149739e129d3fc16af17868c79d8cb6cd13ba67386b79063c5a74207de7155',
productKey: '',
},
community: {
url: 'https://download.visualstudio.microsoft.com/download/pr/11669033/045b56eb413191d03850ecc425172a7d/vs_Community.exe',
checksum: 'd7f6497ec8ae981b249d5cf259e7a61a70f71fd6929915819739f74f8fddee2d',
productKey: nil,
},
timeout: 3600,
includeRecommended: false,
includeOptional: false,
workloads: [],
}
107 changes: 107 additions & 0 deletions chefignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Put files/directories that should be ignored in this file when uploading
# to a chef-server or supermarket.
# Lines that start with '# ' are comments.

# OS generated files #
######################
.DS_Store
Icon?
nohup.out
ehthumbs.db
Thumbs.db

# SASS #
########
.sass-cache

# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
*.bak
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log

## COMPILED ##
##############
a.out
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/

# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
examples/*
Guardfile
Procfile
.kitchen*
.rubocop.yml
spec/*
Rakefile
.travis.yml
.foodcritic
.codeclimate.yml

# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.svn
*/.bzr/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp

# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json

# Cookbooks #
#############
CONTRIBUTING*
CHANGELOG*
TESTING*
MAINTAINERS.toml

# Strainer #
############
Colanderfile
Strainerfile
.colander
.strainer

# Vagrant #
###########
.vagrant
Vagrantfile
12 changes: 12 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name 'visualstudio2017'
maintainer '2018 SYF All Rights Reserved'
maintainer_email 'hisao07@users.noreply.github.com'
issues_url 'https://github.com/hisao07/visualstudio2017/issues'
source_url 'https://github.com/hisao07/visualstudio2017'
license 'Apache-2.0'
description 'Installs/Configures visualstudio2017'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.4'
chef_version '>= 12.1', '~> 12' if respond_to?(:chef_version)
supports 'windows'
depends 'windows', '< 3'
32 changes: 32 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Cookbook:: visualstudio2017
# Recipe:: default
#
# Copyright:: 2018, 2018 SYF All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

conf = node['visualstudio2017']
edition = conf['edition']
includeRecommended = conf['includeRecommended'] ? '--includeRecommended' : ''
includeOptional = conf['includeOptional'] ? '--includeOptional' : ''
workloads = conf['workloads'].map{|workload| "--add #{workload}"}.join(' ')

windows_package 'vs_communitymsires' do
source conf[edition]['url']
checksum conf[edition]['checksum']
installer_type :custom
options "-q --norestart #{workloads} #{includeRecommended} #{includeOptional} --wait"
timeout conf['timeout']
returns [0, 3010]
end

0 comments on commit 6368440

Please sign in to comment.