Build an Image from a Different Git Repository
Using this repository we’ll help you figure out with properties of git-clone step.
In the root of this repository you’ll find a file named
codefresh.yml, this is our build descriptor and it describes the different steps that comprise our process.
Let’s quickly review the contents of this file:
Just head over to the example repository in Github and follow the instructions there.
Using This Example
To use this example:
- Fork this repository to your own [INSERT_SCM_SYSTEM (git, bitbucket)] account.
- Log in to Codefresh using your [INSERT_SCM_SYSTEM (git, bitbucket)] account.
- Click the
- Select the forked repository.
- Select the
I have a Codefresh.yml fileoption.
- Complete the wizard.
Git-clone step with github token
How to generate the github token
Go to the page Personal access tokens Generate and configure the access for personal token Configuration in Codefresh:
We assume you already forked this repo and create a service for it
- Open the service and add new pipeline
- Switch to Use YML build
- Change the YML File Location to be ./codefresh.git.clone.example.yml
- Under Environment variables fill the next variables:
- GIT_TOKEN your personal access token that you generated on github
- REPO_OWNER owner of repository that you want to clone
- REPO_NAME name of repository that you want to clone
- BRANCH branch of repo
Instead of hard-coding the credentials, you can provide the environment variables