---
title: "Discussion on \"difference between sh 'docker login -u ${env.myUsername} -p ${env.myPassword}' and sh \"docker login -u ${env.myUsername} -p ${env.myPassword}\" in decl\" | Hashnode"
description: "Discussion on \"difference between sh 'docker login -u ${env.myUsername} -p ${env.myPassword}' and sh \"docker login -u ${env.myUsername} -p ${env.myPassword}\" in decl\". In Jenkins Declarative Pipeline syntax, there is a difference between using single quotes (') and double quotes (\") when defining a shell command.\nWhen using single quotes ('), Groovy treats the entire string as a literal  and does not perform variab..."
url: "https://hashnode.com/posts/difference-between-sh-docker-login-u-envmyusername-p-envmypassword-and-sh-docker-login-u-envmyusername-p-envmypassword-in-decl/6448c7ef4c1a8b3e44688e9f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [difference between sh 'docker login -u ${env.myUsername} -p ${env.myPassword}' and sh "docker login -u ${env.myUsername} -p ${env.myPassword}" in decl](https://gauravdevopsblog.hashnode.dev/difference-between-sh-docker-login-u-envmyusername-p-envmypassword-and-sh-docker-login-u-envmyusername-p-envmypassword-in-decl?utm_source=hashnode&utm_medium=feed)

In Jenkins Declarative Pipeline syntax, there is a difference between using single quotes (') and double quotes (") when defining a shell command. When using single quotes ('), Groovy treats the entire string as a literal and does not perform variab...

Apr 26, 2023 · 2 min read · gauravdevopsblog.hashnode.dev  
Read the article

-   [#jenkins](https://hashnode.com/tag/jenkins)
-   [#trainwithshubham](https://hashnode.com/tag/trainwithshubham)
-   [#declarative-pipeline](https://hashnode.com/tag/declarative-pipeline)

## Written by

[Gaurav-Jethuri](https://hashnode.com/@gauravjethuri11)

@gauravjethuri11

  
[View profile](https://hashnode.com/@gauravjethuri11)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
