New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add output for "secrets" and "configs" on stack deploy #593

Merged
merged 1 commit into from Oct 3, 2017

Conversation

Projects
None yet
6 participants
@thaJeztah
Member

thaJeztah commented Oct 3, 2017

When deploying a stack from a compose file, the output did not show
that a secret or config was created. This patch adds messages for these.

Create a configuration file and compose file:

$ cat > config.yml <<EOF
hello: world
EOF

$ cat > secret.txt <<EOF
p@ssw0rd
EOF


$ cat > docker-compose.yml <<EOF
version: "3.3"
services:
   test:
     image: nginx:alpine
     configs:
     - source: myconfig
       target: /my-config.yml
     secrets:
     - source: mysecret
       target: /my-secret.txt
configs:
  myconfig:
    file: ./config.yml
secrets:
  mysecret:
    file: ./secret.txt
EOF

Before this patch is applied:

$ docker stack deploy -c docker-compose.yml example

Creating network example_default
Creating service example_test

After this patch is applied:

$ docker stack deploy -c docker-compose.yml example
Creating network example_default
Creating secret example_mysecret
Creating config example_myconfig
Creating service example_test

- What I did

Added additional messages during docker stack deploy

- How to verify it

See steps above

- Description for the changelog

* Add informational messages about creating `secrets` and `configs` during `docker stack deploy` [docker/cli#593](https://github.com/docker/cli/pull/593)

- A picture of a cute animal (not mandatory but encouraged)

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Oct 3, 2017

Codecov Report

Merging #593 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
- Coverage   49.41%   49.41%   -0.01%     
==========================================
  Files         208      208              
  Lines       17184    17186       +2     
==========================================
  Hits         8492     8492              
- Misses       8260     8262       +2     
  Partials      432      432

codecov-io commented Oct 3, 2017

Codecov Report

Merging #593 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
- Coverage   49.41%   49.41%   -0.01%     
==========================================
  Files         208      208              
  Lines       17184    17186       +2     
==========================================
  Hits         8492     8492              
- Misses       8260     8262       +2     
  Partials      432      432
Show outdated Hide outdated cli/command/stack/deploy_composefile.go Outdated
Add output for "secrets" and "configs" on stack deploy
When deploying a stack from a compose file, the output did not show
that a secret or config was created. This patch adds messages for these.

Create a configuration file and compose file:

    $ cat > config.yml <<EOF
    hello: world
    EOF

    $ cat > secret.txt <<EOF
    p@ssw0rd
    EOF

    $ cat > docker-compose.yml <<EOF
    version: "3.3"
    services:
       test:
         image: nginx:alpine
         configs:
         - source: myconfig
           target: /my-config.yml
         secrets:
         - source: mysecret
           target: /my-secret.txt
    configs:
      myconfig:
        file: ./config.yml
    secrets:
      mysecret:
        file: ./secret.txt
    EOF

Before this patch is applied:

    $ docker stack deploy -c docker-compose.yml example
    Creating network example_default
    Creating service example_test

After this patch is applied:

    $ docker stack deploy -c docker-compose.yml example
    Creating network example_default
    Creating secret example_mysecret
    Creating config example_myconfig
    Creating service example_test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@dnephin

dnephin approved these changes Oct 3, 2017

LGTM

@cpuguy83

LGTM

@cpuguy83 cpuguy83 merged commit 1367fc1 into docker:master Oct 3, 2017

7 of 8 checks passed

codecov/patch 0% of diff hit (target 50%)
Details
ci/circleci: cross Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: shellcheck Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
codecov/project 49.41% (-0.01%) compared to 448d56a
Details
dco-signed All commits are signed

@GordonTheTurtle GordonTheTurtle added this to the 17.11.0 milestone Oct 3, 2017

@thaJeztah thaJeztah deleted the thaJeztah:add-create-output branch Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment