Skip to content

Commit 88b6342

Browse files
DavidSsheenaajay
authored andcommitted
Update pdk-templates for gitpod and codespaces support
1 parent 8498326 commit 88b6342

File tree

7 files changed

+83
-10
lines changed

7 files changed

+83
-10
lines changed

.gitpod.Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM gitpod/workspace-full
2+
RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \
3+
wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \
4+
sudo dpkg -i puppet6-release-bionic.deb && \
5+
sudo dpkg -i puppet-tools-release-bionic.deb && \
6+
sudo apt-get update && \
7+
sudo apt-get install -y pdk zsh puppet-agent && \
8+
sudo apt-get clean && \
9+
sudo rm -rf /var/lib/apt/lists/*
10+
RUN sudo usermod -s $(which zsh) gitpod && \
11+
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
12+
echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \
13+
echo 'PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin"' >> /home/gitpod/.zshrc && \
14+
sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \
15+
mkdir -p /home/gitpod/.config/puppet && \
16+
/opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml
17+
RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb
18+
ENTRYPOINT /usr/bin/zsh

.gitpod.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
4+
tasks:
5+
- init: pdk bundle install
6+
7+
vscode:
8+
extensions:
9+
- puppet.puppet-vscode@1.0.0:oSzfTkDf6Cmc1jOjgW33VA==

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Style/BlockDelimiters:
3333
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
3434
be consistent then.
3535
EnforcedStyle: braces_for_chaining
36+
Style/BracesAroundHashParameters:
37+
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
38+
See https://github.com/rubocop-hq/rubocop/pull/7643
39+
Enabled: false
3640
Style/ClassAndModuleChildren:
3741
Description: Compact style reduces the required amount of indentation.
3842
EnforcedStyle: compact

.sync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ Rakefile:
4242
spec/spec_helper.rb:
4343
mock_with: ":rspec"
4444
coverage_report: true
45+
<<<<<<< HEAD
4546
.github/workflows/nightly.yml:
4647
unmanaged: false
4748
.github/workflows/pr_test.yml:
49+
=======
50+
.gitpod.Dockerfile:
51+
unmanaged: false
52+
.gitpod.yml:
53+
>>>>>>> c228e75... Update pdk-templates for gitpod and codespaces support
4854
unmanaged: false

.travis.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,34 @@ jobs:
7272
services: docker
7373
stage: acceptance
7474
- before_script:
75+
<<<<<<< HEAD
76+
=======
77+
- "bundle exec rake 'litmus:provision_list[travis_el8]'"
78+
- "bundle exec rake 'litmus:install_agent[puppet5]'"
79+
- "bundle exec rake litmus:install_module"
80+
env:
81+
PLATFORMS: travis_el8_puppet5
82+
BUNDLE_WITH: system_tests
83+
rvm: 2.5.7
84+
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
85+
services: docker
86+
stage: acceptance
87+
<<<<<<< HEAD
88+
- before_script:
89+
=======
90+
-
91+
before_script:
92+
- "bundle exec rake 'litmus:provision_list[travis_el8]'"
93+
- "bundle exec rake 'litmus:install_agent[puppet5]'"
94+
- "bundle exec rake litmus:install_module"
95+
bundler_args:
96+
env: PLATFORMS=travis_el8_puppet5
97+
rvm: 2.5.7
98+
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
99+
services: docker
100+
stage: acceptance
101+
-
102+
before_script:
75103
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
76104
- "bundle exec rake 'litmus:install_agent[puppet6]'"
77105
- "bundle exec rake litmus:install_module"
@@ -93,6 +121,17 @@ jobs:
93121
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
94122
services: docker
95123
stage: acceptance
124+
-
125+
before_script:
126+
- "bundle exec rake 'litmus:provision_list[travis_el8]'"
127+
- "bundle exec rake 'litmus:install_agent[puppet6]'"
128+
- "bundle exec rake litmus:install_module"
129+
bundler_args:
130+
env: PLATFORMS=travis_el8_puppet6
131+
rvm: 2.5.7
132+
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
133+
services: docker
134+
stage: acceptance
96135
-
97136
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
98137
stage: static

Gemfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@ group :development do
2020
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2121
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2222
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
23-
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
24-
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
25-
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
26-
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "github_changelog_generator", require: false
28-
end
29-
group :system_tests do
30-
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
31-
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
23+
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
24+
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
25+
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
26+
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27+
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
28+
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
3229
end
3330

3431
puppet_version = ENV['PUPPET_GEM_VERSION']

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@
8989
],
9090
"pdk-version": "1.18.1",
9191
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
92-
"template-ref": "heads/main-0-g1862b96"
92+
"template-ref": "heads/main-0-g874030e"
9393
}

0 commit comments

Comments
 (0)