<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dannypk</title>
    <description>The latest articles on DEV Community by dannypk (@dannypk).</description>
    <link>https://dev.to/dannypk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F290281%2F8ea8f619-17d0-4e6f-b97a-f990512a640a.png</url>
      <title>DEV Community: dannypk</title>
      <link>https://dev.to/dannypk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dannypk"/>
    <language>en</language>
    <item>
      <title>How to use variables in bamboo for building and deploying and how to store sensitive information</title>
      <dc:creator>dannypk</dc:creator>
      <pubDate>Fri, 13 Dec 2019 19:13:14 +0000</pubDate>
      <link>https://dev.to/dannypk/how-to-use-variables-in-bamboo-for-building-and-deploying-and-how-to-store-sensitive-information-3dh4</link>
      <guid>https://dev.to/dannypk/how-to-use-variables-in-bamboo-for-building-and-deploying-and-how-to-store-sensitive-information-3dh4</guid>
      <description>&lt;p&gt;Hello Dear Coders,&lt;/p&gt;

&lt;p&gt;Last time I wrote an article regarding security with &lt;a href="https://medium.com/@daniel.pacurici/nexus-package-manager-how-to-access-your-npm-packages-after-securing-nexus-239aa121a96c"&gt;Nexus and NPM Packages&lt;/a&gt;. Once your packages are secure, how do your CI Builds are supposed to work and do things like &lt;strong&gt;npm install&lt;/strong&gt; or how can they run your docker containers? &lt;/p&gt;

&lt;p&gt;This article will show you how to do that if you are using Bamboo.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Bamboo has some 2 types of variables:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;global variables&lt;/li&gt;
&lt;li&gt;plan specific variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the global variables share the same name as the plan specific variables, then the plan specific variable will overwrite the global variable.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How to define a global variable:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to Bamboo and open administrator panel by &lt;em&gt;clicking the cogwheel&lt;/em&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z01lC9XK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8wdis2bn2jatv2otx4ae.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;From the left panel, under &lt;em&gt;Build Resources&lt;/em&gt; choose &lt;em&gt;Global Variables&lt;/em&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Myq8Gu4L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/atnpx39tq2gliv3hc5b9.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Create a new variable by giving it a name and a value and &lt;em&gt;click Add&lt;/em&gt;.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n34ioTse--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3wregy8f4ac9mtstmp5s.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How to define a plan variable:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to the Plan and press &lt;strong&gt;E&lt;/strong&gt;(dit) key or go to &lt;em&gt;Actions&lt;/em&gt; and click &lt;em&gt;Configure plan&lt;/em&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mjkpGelw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ayp5bsjfa4qq8qt6u6d4.jpg" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;em&gt;Variables&lt;/em&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AJRh7DLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0uyeeiimoftsbmkck9l4.jpg" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;The same step as on global variable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you can use that variable in your plans. But what about sensitive information ? &lt;/p&gt;

&lt;p&gt;Bamboo provides us with a feature that allows us to store sensitive information. If your variable name contains one of the keywords "PASSWORD" or "SECRET", it will automatically encrypt that information &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vX3IcKr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j4mkofbvol8laz1fxp93.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vX3IcKr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j4mkofbvol8laz1fxp93.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's a very nice feature and very helpful.&lt;/p&gt;

&lt;p&gt;After the variables are configured, we can create our task and use our variables like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PORT=${bamboo.PORT}
echo \_auth = ${bamboo.SECRET_NEXUS_AUTH} &amp;gt;&amp;gt; .npmrc
./docker-build.sh ${bamboo.CONTAINER_NAME} ${bamboo.PORT}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In your build logs, you will see that the variables are encrypted and the sensitive data is not stored.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---YgvTeOb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5f1tzd7fhvcxs843uuwk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---YgvTeOb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5f1tzd7fhvcxs843uuwk.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same way you can use the variables in your deployment tasks.&lt;/p&gt;

&lt;p&gt;Thanks for reading and I hope this will bring a bit of security to your projects. Comments are welcome ! :)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>bamboo</category>
      <category>ciandcd</category>
      <category>security</category>
    </item>
    <item>
      <title>Nexus package manager: How to access your NPM packages after securing Nexus</title>
      <dc:creator>dannypk</dc:creator>
      <pubDate>Wed, 11 Dec 2019 15:47:53 +0000</pubDate>
      <link>https://dev.to/dannypk/nexus-package-manager-how-to-access-your-npm-packages-after-securing-nexus-bje</link>
      <guid>https://dev.to/dannypk/nexus-package-manager-how-to-access-your-npm-packages-after-securing-nexus-bje</guid>
      <description>&lt;p&gt;Dear coders,&lt;/p&gt;

&lt;p&gt;I joined Medium.com some days ago and I wrote an interesting article there. But then i found out about dev.to and from now on I will start creating content here. But since I already wrote the article there, I will just link it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@daniel.pacurici/nexus-package-manager-how-to-access-your-npm-packages-after-securing-nexus-239aa121a96c"&gt;https://medium.com/@daniel.pacurici/nexus-package-manager-how-to-access-your-npm-packages-after-securing-nexus-239aa121a96c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward for your thoughts. Thank you and happy coding !&lt;/p&gt;

</description>
      <category>nexus</category>
      <category>npm</category>
      <category>docker</category>
      <category>node</category>
    </item>
  </channel>
</rss>
