r10k 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89108575df655aa63ddced0692fa8815939d0d472b85914ea29430e1f76985b9
4
- data.tar.gz: 343319b5506fb72d905b3a510765d3dac0bb3643188a95fc24cdb83f90e4d490
3
+ metadata.gz: 2f2418e73622a4149507cc7e2dde74b68a448689da2a7287b19107fbef0e184e
4
+ data.tar.gz: 95acaeb5cb7ad0969ec3f2a3545ab82490bafb9d0fca5da444125bbe780b9836
5
5
  SHA512:
6
- metadata.gz: d034cbfd986f11e9b0a3298a015d75a41db6800a06b8e437b06b1298dac0ea008a6fdd8c20546806faf3d8c58f1f964073a148609bcabb025610aa7e7b9425b6
7
- data.tar.gz: 61629bc37a035d75b70a2cf70dd0cd91a0af8286215da2498518e7a6f698091584576c3afb31b734521edae36e4d371b34bc6f2e9ca08824d167d7748c4c646d
6
+ metadata.gz: dd666a18fe5df938ab5a151cf411ac335e0f3f151428fe8589010ff699b832609fc58e189c46f52894d9d6b9d8e63156ed928bd14d2ed02d5d9a113fc0c5feb0
7
+ data.tar.gz: 40307661c96a21d00595271fa21836175c993dc937504b82b449218e39cd3804000a7c24c32a52aa570098b450fd35417573190dd9d603ac087e217f391aacb4
@@ -10,6 +10,7 @@ jobs:
10
10
  env:
11
11
  PUPPERWARE_ANALYTICS_STREAM: production
12
12
  IS_LATEST: true
13
+ # Still need these env vars for README publishing
13
14
  DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
14
15
  DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
15
16
 
@@ -17,6 +18,10 @@ jobs:
17
18
 
18
19
  steps:
19
20
  - uses: actions/checkout@master
21
+ - uses: azure/docker-login@v1
22
+ with: # This doesn't seem to work unless we point directly to the secrets
23
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
24
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
20
25
  - name: Set up Ruby 2.6
21
26
  uses: actions/setup-ruby@v1
22
27
  with:
@@ -28,5 +33,24 @@ jobs:
28
33
  - name: Publish container
29
34
  working-directory: docker
30
35
  run: |
31
- docker login -u "$DOCKERHUB_USERNAME" -p "$DOCKERHUB_PASSWORD"
32
36
  make publish
37
+ - name: Build release container
38
+ env:
39
+ IS_RELEASE: true
40
+ working-directory: docker
41
+ run: |
42
+ if make prep; then
43
+ make lint build test
44
+ else
45
+ echo "Skipping release container building and testing"
46
+ fi
47
+ - name: Publish release container
48
+ env:
49
+ IS_RELEASE: true
50
+ working-directory: docker
51
+ run: |
52
+ if make prep; then
53
+ make publish
54
+ else
55
+ echo "Skipping release container publishing"
56
+ fi
@@ -6,7 +6,7 @@ notifications:
6
6
  email: false
7
7
  sudo: false
8
8
  jdk:
9
- - openjdk8
9
+ - openjdk11
10
10
  before_install: gem install bundler -v '< 2' --no-document
11
11
  matrix:
12
12
  include:
@@ -23,20 +23,23 @@ matrix:
23
23
  - stage: r10k tests
24
24
  rvm: jruby
25
25
  - stage: r10k container tests
26
- dist: bionic
26
+ dist: focal
27
27
  language: ruby
28
28
  services:
29
- # bionic uses 18.06 but need 19.03+ for buildkit so upgrade later in relevant cell
30
29
  - docker
31
- rvm: 2.6.5
30
+ rvm: 2.6.6
32
31
  env:
32
+ - DOCKER_COMPOSE_VERSION=1.25.5
33
33
  # necessary to prevent overwhelming TravisCI build output limits
34
34
  - DOCKER_BUILD_FLAGS="--progress plain"
35
+ before_install:
36
+ - sudo rm /usr/local/bin/docker-compose
37
+ - curl --location https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname --kernel-name`-`uname --machine` > docker-compose
38
+ - chmod +x docker-compose
39
+ - sudo mv docker-compose /usr/local/bin
35
40
  script:
36
- - |
37
- set -ex
38
- sudo apt update -y && sudo apt install -y docker.io
39
- sudo systemctl unmask docker.service
40
- sudo systemctl start docker
41
- cd docker && make lint build test
42
- set +x
41
+ - set -e
42
+ - cd docker
43
+ - make lint
44
+ - make build
45
+ - make test
@@ -4,6 +4,11 @@ CHANGELOG
4
4
  Unreleased
5
5
  ----
6
6
 
7
+ 3.5.1
8
+ -----
9
+
10
+ - Upgrade Rugged Gemfile dependency for local development to ~> 1.0
11
+
7
12
 
8
13
  3.5.0
9
14
  -----
@@ -15,7 +20,7 @@ Unreleased
15
20
  [#813](https://github.com/puppetlabs/r10k/issues/813)
16
21
 
17
22
  3.4.1
18
- ----
23
+ -----
19
24
 
20
25
  - Add support for Ruby 2.7
21
26
  - (RK-357) Restrict gettext and fast_gettext versions for compatibility with Ruby 2.4
@@ -394,7 +399,7 @@ Puppetfile should be installed to. See the [Puppetfile documentation](https://gi
394
399
 
395
400
  You can now configure how r10k purges unmanaged content after a deployment. The
396
401
  default behavior should be unchanged but there is a new "purge\_levels" configuration
397
- option that can be used to enable new behavior or de-activate certain existing
402
+ option that can be used to enable new behavior or de-activate certain existing
398
403
  behaviors. See the relevant [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#purge_levels) for more details.
399
404
 
400
405
  (RK-223) Ability to track control repo branch from content declarations.
@@ -441,7 +446,7 @@ fix.)
441
446
  Previously, r10k only supported the use of HTTP proxies for connecting to the Puppet
442
447
  Forge. With these changes, r10k can now be configured to use an HTTP proxy for both
443
448
  Forge and Git operations. Configuration can be specified globally, for Forge or Git
444
- only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
449
+ only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
445
450
  for more details.
446
451
 
447
452
  ### Bug Fixes
@@ -462,9 +467,9 @@ for SSH.
462
467
  (RK-241) "deploy display" action does not properly format wrapped exceptions
463
468
 
464
469
  The "deploy display" action was not capturing and logging exceptions in the same way as
465
- other related actions. This meant that in many cases, when an error occurred, the
470
+ other related actions. This meant that in many cases, when an error occurred, the
466
471
  underlying cause was not being shown. Specifically, the "deploy display" action was
467
- not benefitting from the improved error messaging for unreadable SSH keys which was
472
+ not benefitting from the improved error messaging for unreadable SSH keys which was
468
473
  added in r10k 2.2.0 as part of RK-220.
469
474
 
470
475
  2.2.1
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  group :extra do
5
- gem 'rugged', '>= 0.24.0', '< 0.24.6', :platforms => :ruby
5
+ gem 'rugged', '~> 1.0', :platforms => :ruby
6
6
  end
7
7
 
8
8
  group :development do
@@ -141,7 +141,7 @@ modulepath = modules:external-modules
141
141
 
142
142
  Lastly, you can simply move your locally versioned modules to a separate
143
143
  directory to avoid conflicting over the `/modules` directory entirely. With this
144
- example as well you can use the `environment.conf file to tell Puppet which
144
+ example as well you can use the `environment.conf` file to tell Puppet which
145
145
  directories contain modules.
146
146
 
147
147
  ```
@@ -149,6 +149,11 @@ directories contain modules.
149
149
  modulepath = internal-modules:modules
150
150
  ```
151
151
 
152
+ #### Does R10K support Local/Private Forge?
153
+
154
+ Yes. Set the Forge to use _globally_ in `r10k.yaml`. see [Configuration](/doc/dynamic-environments/configuration.mkd#baseurl) for details.
155
+
156
+
152
157
  #### What does the name mean?
153
158
 
154
159
  It’s called R10K because I’m terrible at names. When I started working on R10K
@@ -54,6 +54,8 @@ The `forge` setting specifies which server that Forge based modules are fetched
54
54
  from. This is currently a noop and is provided for compatibility with
55
55
  librarian-puppet.
56
56
 
57
+ R10k supports setting the Forge to use _globally_ in `r10k.yaml`. see [Configuration](/doc/dynamic-environments/configuration.mkd#baseurl) for details.
58
+
57
59
  ### moduledir
58
60
 
59
61
  The `moduledir` setting specifies where modules from the Puppetfile will be
@@ -1,6 +1,6 @@
1
1
  PUPPERWARE_ANALYTICS_STREAM ?= dev
2
2
  NAMESPACE ?= puppet
3
- git_describe = $(shell git describe)
3
+ git_describe = $(shell git describe --tags)
4
4
  vcs_ref := $(shell git rev-parse HEAD)
5
5
  build_date := $(shell date -u +%FT%T)
6
6
  hadolint_available := $(shell hadolint --help > /dev/null 2>&1; echo $$?)
@@ -13,6 +13,14 @@ export DOCKER_BUILDKIT = 1
13
13
 
14
14
  ifeq ($(IS_RELEASE),true)
15
15
  VERSION ?= $(shell echo $(git_describe) | sed 's/-.*//')
16
+ PUBLISHED_VERSION ?= $(shell curl --silent 'https://rubygems.org/api/v1/gems/r10k.json' | jq '."version"' | tr -d '"')
17
+ CONTAINER_EXISTS = $(shell DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $(NAMESPACE)/r10k:$(VERSION) > /dev/null 2>&1; echo $$?)
18
+ ifeq ($(CONTAINER_EXISTS),0)
19
+ SKIP_BUILD ?= true
20
+ else ifneq ($(VERSION),$(PUBLISHED_VERSION))
21
+ SKIP_BUILD ?= true
22
+ endif
23
+
16
24
  LATEST_VERSION ?= latest
17
25
  dockerfile := release.Dockerfile
18
26
  dockerfile_context := r10k
@@ -26,6 +34,10 @@ endif
26
34
  prep:
27
35
  @git fetch --unshallow 2> /dev/null ||:
28
36
  @git fetch origin 'refs/tags/*:refs/tags/*'
37
+ ifeq ($(SKIP_BUILD),true)
38
+ @echo "SKIP_BUILD is true, exiting with 1"
39
+ @exit 1
40
+ endif
29
41
 
30
42
  lint:
31
43
  ifeq ($(hadolint_available),0)
@@ -16,6 +16,11 @@ ARG version="3.1.0"
16
16
  # Used by entrypoint to submit metrics to Google Analytics.
17
17
  # Published images should use "production" for this build_arg.
18
18
  ARG pupperware_analytics_stream="dev"
19
+ # required to schedule runs of "r10k" in K8s
20
+ ARG supercronic_version="0.1.9"
21
+ ARG supercronic_sha1sum="5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85"
22
+ ARG supercronic="supercronic-linux-amd64"
23
+ ARG supercronic_url="https://github.com/aptible/supercronic/releases/download/v$supercronic_version/$supercronic"
19
24
 
20
25
  LABEL org.label-schema.maintainer="Puppet Release Team <release@puppet.com>" \
21
26
  org.label-schema.vendor="Puppet" \
@@ -32,7 +37,7 @@ COPY docker/r10k/docker-entrypoint.d /docker-entrypoint.d
32
37
  ENTRYPOINT ["/docker-entrypoint.sh"]
33
38
  CMD ["help"]
34
39
 
35
- # dyanmic LABELs and ENV vars placed lower for the sake of Docker layer caching
40
+ # dynamic LABELs and ENV vars placed lower for the sake of Docker layer caching
36
41
  ENV PUPPERWARE_ANALYTICS_STREAM="$pupperware_analytics_stream"
37
42
 
38
43
  LABEL org.label-schema.version="$version" \
@@ -40,16 +45,21 @@ LABEL org.label-schema.version="$version" \
40
45
  org.label-schema.build-date="$build_date"
41
46
 
42
47
  COPY --from=build /workspace/r10k.gem /
48
+ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
43
49
  # ignore apk and gem pinning
44
50
  # hadolint ignore=DL3018,DL3028
45
- RUN chmod a+x /adduser.sh && \
51
+ RUN chmod a+x /adduser.sh /docker-entrypoint.sh && \
46
52
  # Add a puppet user to run r10k as for consistency with puppetserver
47
53
  /adduser.sh && \
48
- chmod +x /docker-entrypoint.sh && \
49
54
  chown -R puppet: /docker-entrypoint.d /docker-entrypoint.sh && \
50
55
  apk add --no-cache ruby openssh-client git ruby-rugged curl ruby-json ruby-etc && \
51
56
  gem install --no-doc /r10k.gem && \
52
- rm -f /r10k.gem
57
+ rm -f /r10k.gem && \
58
+ curl --fail --silent --show-error --location --remote-name "$supercronic_url" && \
59
+ echo "${supercronic_sha1sum} ${supercronic}" | sha1sum -c - && \
60
+ chmod +x "$supercronic" && \
61
+ mv "$supercronic" "/usr/local/bin/${supercronic}" && \
62
+ ln -s "/usr/local/bin/${supercronic}" /usr/local/bin/supercronic
53
63
 
54
64
  USER puppet
55
65
  WORKDIR /home/puppet
@@ -6,6 +6,11 @@ ARG version="3.1.0"
6
6
  # Used by entrypoint to submit metrics to Google Analytics.
7
7
  # Published images should use "production" for this build_arg.
8
8
  ARG pupperware_analytics_stream="dev"
9
+ # required to schedule runs of "r10k" in K8s
10
+ ARG supercronic_version="0.1.9"
11
+ ARG supercronic_sha1sum="5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85"
12
+ ARG supercronic="supercronic-linux-amd64"
13
+ ARG supercronic_url="https://github.com/aptible/supercronic/releases/download/v$supercronic_version/$supercronic"
9
14
 
10
15
  LABEL org.label-schema.maintainer="Puppet Release Team <release@puppet.com>" \
11
16
  org.label-schema.vendor="Puppet" \
@@ -16,7 +21,7 @@ LABEL org.label-schema.maintainer="Puppet Release Team " \
16
21
  org.label-schema.schema-version="1.0" \
17
22
  org.label-schema.dockerfile="/release.Dockerfile"
18
23
 
19
- COPY docker-entrypoint.sh /
24
+ COPY adduser.sh docker-entrypoint.sh /
20
25
  COPY docker-entrypoint.d /docker-entrypoint.d
21
26
 
22
27
  ENTRYPOINT ["/docker-entrypoint.sh"]
@@ -29,8 +34,21 @@ LABEL org.label-schema.version="$version" \
29
34
  org.label-schema.vcs-ref="$vcs_ref" \
30
35
  org.label-schema.build-date="$build_date"
31
36
 
32
- RUN chmod +x /docker-entrypoint.sh && \
37
+ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
38
+ # ignore apk and gem pinning
39
+ # hadolint ignore=DL3018,DL3028
40
+ RUN chmod a+x /adduser.sh /docker-entrypoint.sh && \
41
+ /adduser.sh && \
42
+ chown -R puppet: /docker-entrypoint.d /docker-entrypoint.sh && \
33
43
  apk add --no-cache ruby openssh-client git ruby-rugged curl ruby-dev make gcc musl-dev && \
34
- gem install --no-doc r10k:"$version" json etc
44
+ gem install --no-doc r10k:"$version" json etc && \
45
+ curl --fail --silent --show-error --location --remote-name "$supercronic_url" && \
46
+ echo "${supercronic_sha1sum} ${supercronic}" | sha1sum -c - && \
47
+ chmod +x "$supercronic" && \
48
+ mv "$supercronic" "/usr/local/bin/${supercronic}" && \
49
+ ln -s "/usr/local/bin/${supercronic}" /usr/local/bin/supercronic
50
+
51
+ USER puppet
52
+ WORKDIR /home/puppet
35
53
 
36
54
  COPY release.Dockerfile /
@@ -2,5 +2,5 @@ module R10K
2
2
  # When updating to a new major (X) or minor (Y) version, include `#major` or
3
3
  # `#minor` (respectively) in your commit message to trigger the appropriate
4
4
  # release. Otherwise, a new patch (Z) version will be released.
5
- VERSION = '3.5.0'
5
+ VERSION = '3.5.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2