Git push mirror
This job does a git push to a remote git repo.
This job provides the following badge:
- None
Dependencies
- None
your .gitlab-ci.yml changes
To use this job add the following to your .gitlab-ci.yml
file
stages:
- sync
include:
- remote: https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/raw/development/git_push_mirror/.gitlab-ci.yml
Github (Push --mirror):
variables:
GIT_SYNC_URL: "https://${username variable}:${pasword variable}@github.com/NoFussComputing/gitlab-ci.git"
extends:
- .git_push_mirror
CI/CD Variables required
var name | Description |
---|---|
GIT_SYNC_URL | this is the remote git repositories https clone address. Note: if the remote repository requires authentication, you will need to build the url. like above. |
Job Workflow
- This job is designed to run on successful completion of the validation tasks and only on the
development
andmaster
branches. You can safely override therules
when creating the job with your own. i.e.
Github (Push --mirror):
variables:
GIT_SYNC_URL: "https://${username variable}:${pasword variable}@github.com/NoFussComputing/gitlab-ci.git"
extends:
- .git_push_mirror
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: never
- if: '$CI_COMMIT_BRANCH == "development"'
when: always
This will cause the job to only run on the development
branch.
Artifacts
- None
Gitlab job Definition
When you include this definition the following makes up the job definition
Note
Docs Still under development
About:
This page forms part of our Project Gitlab-CI.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2021-08-03
Date Edited: 2023-05-23
Contribution:
Would You like to contribute to our Gitlab-CI project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors