How to access GitHub and Bitbucket using AWS CodeStar

The most common and secure way to access GitHub or Bitbucket repositories from AWS is to use AWS CodeStar connection. You can follow this link to create a connection to your external repositories in GitHub, GitHub Enterprise and Bitbucket. After creating a connection, you get the connection arn in the following format: arn:aws:codestar-connections:us-east-1:123456789012:connection/ff4ae225-60db-44d3-8d0e-ff6db6360727 Now, using this connection you can access the external repositories and pull/push code changes. We can simply use the git command as per normal....

How to setup HTTPS in Jenkins

Jenkins by default operates on port 8080 without any encryption in transit. This is not a desired setup in real world scenarios. So, in the following, I’ll go through the steps of setting up HTTPS using a self sign certificate. If you have your own CA signed certificate, the steps are identical. In this example, I used Jenkins 2.346.3 LTS on Ubuntu 22.04. Create a self signed certificate openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \ -subj "/C=AU/ST=VIC/O=example inc/CN=www....

Comprehensions in Python

Using comprehensions in Python is a concise and performant way of iterating through lists, dictionaries and sets. In many scenarios, using comprehensions has advantages over the for-loops and map-and-filters. They increase the readability of the code and provide a better execution performance. The followings are a few simple examples to show how to use comprehensions in Python. Comprehensions applied on lists and sets. # list comprehension l = [1, 2, 3, 4] new_list = [x for x in l] # Set comprehension s = {1, 2, 3, 4} new_set = {x for x in s} Also we can get a set from a list....