Posts

Showing posts from March, 2020

Create a local git for Azure WebApp deployment

From Azure portal, goto your webapp service and select deployment center.  Then create a local git. It looks something like this :- https:// .scm.azurewebsites.net:443/ .git git remote add azure https:// .scm.azurewebsites.net:443/ .git To figure out the username and password, click on the Credential Tab. Then you can provide the username and password for writing to the git repository. Remember to execute the command below to deploy :- git push azure 

Azure function v1, v2 and v3 configuration

React-create script getting unrecognisable token when running yarn or nom start

This is most likely you are using a very old version of the tools (yarn / npm). Try to uninstall and then reinstall the yarn. To uninstall, npm uninstall yarn To Install brew install yarn Then you should be able to use other form of tooling, like yarn install and yarn start to fire up your 'react-create-script'

Docker build with Maven over proxy

Getting maven to build over proxy can be tricky.  So here is an example of a proxy setup which might help. But still you need to ensure that your Maven setings.xml proxy configuration (name and password are correct)

Azure Devops - $(Build.SourcesDirectory) and (System.DefaultWorkingDirectory) is the same

Did you know that $(Build.SourcesDirectory) and (System.DefaultWorkingDirectory) has the same value. For example if you $(Build.SourcesDirectory) is /home/buildadmin/agent/_work/97/s then (System.DefaultWorkingDirectory) is /home/buildadmin/agent/_work/97/s then In case, somebody ask, this could come in handy.

Docker to copy entire folder

To copy entire folder from a running docker instance, all you have to do is use the following command. docker cp :/my/folder_name_only docker run --name targetdockerapp --rm -d ${{ parameters.dockerRegistryName }}/${{ parameters.dockerRepositoryName }}:latest   docker cp targetdockerapp:app/target/site/jacoco $(System.DefaultWorkingDirectory)

React css module

Css module cannot have dashes, It should be something like a whole word. Css format :- .yes .no-no-no

Running dotnet restore for command line in a proxy server (corporate network)

Run dotnet restore and see what info you're getting. If you're getting 407 (Proxy access denied) nuget config -set http_proxy="http://proxysslbypass" nuget config -set http_proxy.user="ourUserName" nuget config -set http_proxy.password="Your secret password." If you're getting 401 then Download nuget.exe ( https://dist.nuget.org/win-x86-commandline/latest/nuget.exe ) Then run the following command line, please make sure you replace the package url name and PAT Token info which you got from Azure DevOps. nuget.exe sources Add -Name "Nuget_Artifact" -Source "https://pkgs.dev.azure.com/somecompany_packaging/division/nuget/v3/index.json" -username MY_USERNAME -password MY_PAT_TOKEN

CSS Grid - fixing first and second column. Third column gets the rest

you can use grid-template-column to fix the size of your grid column. For example, you might want to say 1st and 2nd column has the size of 100px and 200px respectively. The rest goes to column 3, which takes on auto-fill, don't specify any grid size to it.

Terraform - Azure container registry multiple ip network rule setup

You can setup multiple ip rules using for container registry using the terraform code

Azure Devops - Container based build

Here is a sample of using container based build in Azure Devops While this looks cool, i could have use Dockerfile to do similiar things. The only problem i have install docker. Using the containerized based built, I have to copy or manage my artifact directory.

Intellij : How to run maven goal

Image
To run a specific maven goal, click on the "m" for Maven :) and then select the goal you would like to run. If you don't see your goal, just type it out as shown below :- Specifiying goal as illustrated in diagram below :-

dockerfile - using image that allows some debugging for java build

Using this image for debugging purposes during docker build works! :) FROM amd64/adoptopenjdk:13.0.2_8-jdk-openj9-0.18.0-bionic AS publish

react reducer what

Ok where is the general accepted implementation with react-redux. It is a global / subsection state management that maintain data used in your application. For example, lets say you have a Todo list, you might use, the following objects to keep track of it. STATE { - TODO_ID - when user click on ADD_TODO - TODO_LIST - keep tracks of all your tasks you have created. } These are all trigger based on actions. This is why we have to setup actions. Action when someone click "Add Task". Then it sends a certain message - "ADD_TODO' to be specific to a  reducer. What is a reducer? Say you have fire up / dispatch / send out a 'ADD_TODO' instruction and you increment current task id with 1. So you can have a unique Id or some way to keep track of it. This is where you pass it to a reducer. You say hey, my ADD_TODO is fired, get me a new TASK_ID. Reducer is where you are allowed to changes / update state STATE - TODO_ID. Some other action will update ...