On Sunday, January 29, 2023 at 8:38:58 PM UTC-7 Victor Sudakov wrote:
Any ideas or thoughts on this?
On 27.01.2023 16:42, Victor Sudakov wrote:
> Dear Colleagues,
>
> Some CI/CD tools support the concept of contexts or environments. In each
> environment/context, you define a set of variables or secrets with
> different values, and refer to the contexts from the pipeline. For
example,
> for Github Actions you can create the "main" and "dev" environments and
> then mention them in your pipeline:
I've used folders as a way to provide additional context for a job. If one
folder is for dev and another is for main, the environment variables on the
main folder can be different than the environment variables on the dev
folder. Credentials can be assigned to the folder as well. If the same
credential ID is used in both contexts, the job should be able to reference
credentials from the folder.
> jobs:
> build:
> runs-on: ubuntu-latest
> environment: ${{ github.ref_name }}
> steps:
> - name: Test secrets
> run: something
> env:
> SUPER_SECRET: ${{ secrets.TEST_SECRET }}
>
> and the value of secrets.TEST_SECRET will be different for different
> branches.
>
> Do you know of a plugin for Jenkins with a similar functionality for its
> Multibranch Pipelines?
>
> Jenkins has the concept of "credential domains", can they be used for
this
> purpose (like referring to a credential domain from the environment{}
block for
> example)?
>
--
Victor Sudakov
Systems Administrator
Streamline - Property Management Software
Website: www.streamlinevrs.com
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/bbc6dd83-232a-445c-bed9-672728b1047bn%40googlegroups.com.