I have a repository deployed with Netlify. We deploy a staging branch and a production branch.
.toml looks like this
[context.production.environment]
APP_ENV = "production"
[context.staging.environment]
APP_ENV = "staging"
[context.deploy-preview.environment]
APP_ENV = "staging"
The problem is that when we make a pull request to production, we get the staging environment and not the production one.
How can we create different environments for deploy-previews based on branches?
Related
I have a subgroup and I have some repos in it. The repos contain environments. The repos have had deployments. In the subgroup CI/CD settings I am trying to add a variable but the Environment Scope drop down does not show my environments. Any ideas why? Thanks
How do I automate cloning/pushing certain repos to a gitlab instance when it is instantiated?
I'm building an IaC project which uses Gitlab, Terraform and Docker to build testing lab pods.
Thanks!
With Gitlab provider:
resource "gitlab_project" "terraform" {
name = "my_shiny_new_project"
import_url = "https://github.com/hashicorp/terraform.git"
}
Above will create a new project named "terraform" containing cloned repo from given URL.
I am trying to extend a template on a Azure DevOps pipeline which exists on a repository hosted on Azure Devops. Code looks like below.
resources:
repositories:
- repository: devops
type: git
name: otherProject/repositoryXYZ
ref: main
parameters:
- name: environment
type: string
values:
- "UAT"
- "Production"
default: "UAT"
trigger:
- none
pr: none
extends:
template: folder/template.yml#devops
parameters:
environment: ${{ parameters.environment }}
When I deploy this pipeline on the same project on which repository repositoryXYZ exists, I get a successful run.
For example I have a project A which holds 5 pipelines. One of the pipelines is the above and can download the repository and run successfully. This pipeline exists in project A where repositoryXYZ is located.
When I deploy the same pipeline from a different project project B within the same Azure Devops organization, I get the below error.
/azure-repo.yml: The repository DevOps in project f1809f72 could not be retrieved. Verify the name and credentials being used.
The id of the project on the logs is for project B. (f1809f72).
I tried to alter DevOps repository permissions and to append project
build collection administrators full access. (repositoryXYZ)
Then I tried to place the repository on github and I got the same
issue (added a PAT and changed the directories for the repository)
I also tried to edit project settings and deactivate the limit jobs
options. (all limit job aithorization settings have been deactivated for both projects)
Do I miss something? How can I use my pipeline to extend the template which will be downloaded from an Azure Devops repository of another project within the same devops organization?
The pipeline cannot start running at all, so I guess something should be wrong with the permissions.
My error was the referencing repository on the template.yml file. On the build pipeline I was pointing the correct repository, but on the template I was pointing a false one that could not be retrieved. I corrected that and I was able to trigger the pipeline.
I have an Azure DataFactory resource and I want two environments (prod and dev), where dev and prod should have their own (different) LinkedService and Trigger.
When modified pipeline from branch "develop" git and save, I can't execute trigger because a message appears and it says something like that I should merge "develop" branch with "master" branch but I would like only to merge the pipeline and the dataset, for example, NO linkedservice and trigger.
Does anyone know how to achieve that?
I have a node.js microservice running on azure webapp.
I have two different resource group in azure dev and prod
I have two different config file in that microservice let say devConfig and prodConfig both have a different configuration for the respective environment.
I want to find on which resource group my webapp is running, so that if its dev I fetch the details from devConfig and same for prodConfig.
Just create an environment variable in each webapp and make it return dev in dev and prod in prod
Reference:
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-configure
Get env variable in node:
process.env.ENV_VARIABLE_NAME