I have this Scenario wherein I have to connect to multiple repositories in github and extract properties file of individual projects.
Related
I have a database-driven application with a single code base configured for multiple clients using the database setting and config files.
The main code base consists of common/core code/files that are being used by all the clients and some client-specific code/files. Both types of files are in different folders of the same repository.
We have been planning to integrate CI/CD using GitHub and Jenkins. I am new to Jenkins.
In GitHub, we have a single repository that contains all the code/files. I want to use Jenkins to deploy to different client environments but make sure that only files related to a specific client should be deployed to that client environment.
What could be the best way or possible solutions for this?
Edit: Basically I want to deploy specific files that are client related to specific client environments.
Any and all suggestions would be highly appreciated.
Is there a way to download all files with a specific name from the master branches of all the projects in an Azure DevOps installation?
I have been tasked with documenting all of the entries in all of the appsettings.json files in our entire codebase and I would prefer to not have to go through all 300 repositories to manually download these files if I don't absolutely have to.
Is there a way to download all files with a specific name from the
master branches of all the projects in an Azure DevOps installation?
This is not supported. Please check this document, we recommend different project(with one or more repos) for different products/sub-modules of big product. So in Azure Devops Service there's no such out-of-box feature to find/download files across projects.
A possible direction:
If those appsettings.json files are in root directory of your repos. You may save some time by using these two Rest APIs:
List all repos in current organization:
GET https://dev.azure.com/{OrganizationName}/_apis/git/repositories?api-version=5.1
Get File(Download):
GET https://dev.azure.com/{OrganizationName}/_apis/git/repositories/{Repositoryid}/items?scopePath=/appsettings.json&download=true&api-version=5.1
You can use PowerShell script to combine these two apis. The first one will list all Repositoryids in your organization, and the second one can download the appsettings.json from different repos via different Repositoryids. So the possible way could be run the first api once to get list of reposID(You can check this similar one) and then add a loop to get the files one by one.
I am developing an application with fronend and backend separated and communicated using REST API (say, backend is JAVA/.NET/NodeJS and frontend is React/Angular).
In BitBucket we can have a project and inside that project we can have multiple repository so that code base for backend and frontend can be in same container,
But in Github, if I am not wrong, concept of project is entirely different (Project vs Repository in GitHub).
Is there any way to have this feature in Github. Because I have lot of projects which all have separate frontend and backend and it will be helpful if I can organize repositories for a single application in one place instead of keeping it with long list of other applications repositories.
Thanks in advance!
The closest would be to combine:
GitHub Organization in order to declare in it all your repositories
an Organization-wide project board in order to manage all your issues and pull requests across those repositories within that organization.
When creating an open source library on GitHub or another public website, should I publish the .nuspec file that describes the corresponding NuGet package?
I've done this a couple of times (since no API key or other sensitive information is included in the .nuspec file) in order to allow myself to easily publish subsequent versions without keeping private file, and to allow other people to fork it and add their own descriptions easily. However, the developers of many top packages don't seem to publish .nuspec files in their repositories (sometimes they publish NuGet.exe along with a .targets file, and so on), so I'm thinking that maybe I'm doing something wrong.
The package authoring should be considered part of the source code since it is a required asset to build the fully usable output.
Some projects use special msbuild-based tooling to create the nuspec file during the build so it seems like there is none in the repository. the new "SDK-based" projects (e.g. .NET Standard libraries) have integrated nuget tooling to be able to create a nupkg file from the csproj without the need to create a nuspec file. This tooling is also being adopted by some popular packages (e.g. Newtonsoft.Json).
When I create a new Github Organization job and then configure it. In the 'Project Recognizers' section I only have the ability to select 'Project Jenkinsfile' (with no input fields), which will use the Jenkinsfile in the root of each repository. I would like to be able to have a way of recognising the project but then using a different Jenkinsfile from a different GitHub repository.
I do not want the project developers to be able to modify the workflow of the project. How can I specify to use a Jenkins file from a URL location in this type of Job?