Relative Content

Tag Archive for gitlabgitlab-cipipelinecicd

Unable to get predefined source branch variables in Gitlab pipeline

$ echo “Source branch:$CI_MERGE_REQUEST_BRANCH” Source branch: $ echo “Target branch:$CI_COMMIT_REF_NAME” Target branch:develop $ echo “CI_MERGE_REQUEST_DIFF_BASE_SHA:$CI_COMMIT_BEFORE_SHA” CI_MERGE_REQUEST_DIFF_BASE_SHA:48f01e3243wfd232dx345x445634 $ echo “CI_COMMIT_BRANCH:$CI_COMMIT_BRANCH” CI_COMMIT_BRANCH:develop $ echo “Current branch:$CI_COMMIT_REF_NAME” Current branch:develop I need to merge the source branch name and target branch name when merging from the source branch to the target branch. These variables cannot get names from the […]

Looping through Gitlab-ci inputs array type

With introduction of the array type for Gitlab-ci inputs I have wanted to do things such as looping through the contents of that array, however what I have found is that even though it’s set as a type of array, bash does not see it as a conventional array in bash.

How do I access a project’s package registry from within that projects CI/CD pipeline in Gitlab?

I am trying to set up my project’s CI/CD pipeline in GitLab and I am getting stuck at every turn. I am attempting to access package dependencies that are housed within the project in GitLab’s package repository, because a few of the .jar files we need are not located within Maven’s central repo. I keep getting a ‘401 Unauthorized’ error no matter how I configure my settings, pom, and yaml file. I’m fairly new to this, so I’m sure there’s something silly I’m missing, but I’m just not seeing it. The full error is below. I’m replacing references to company/project names with dummies but everything else is copy pasted from the trace.