Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/localCI/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Before running the commands of each stage, **localCI** exports the following env
+---------------------+----------------------+-----------------------------------------------------+
| LOCALCI_REPO_SLUG | E.g foo/bar | Repository owner / repository name |
+---------------------+----------------------+-----------------------------------------------------+
| LOCALCI_PR_NUMBER | E.g 23 | Pull request number |
+---------------------+----------------------+-----------------------------------------------------+


Configuration file
Expand Down
5 changes: 4 additions & 1 deletion cmd/localCI/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (r *Repo) setup() error {
// add environment variables
r.env = os.Environ()
r.env = append(r.env, defaultEnv...)
repoSlug := fmt.Sprintf("LOCALCI_REPO_SLUG=\"%s/%s\"", r.cvr.getOwner(), r.cvr.getRepo())
repoSlug := fmt.Sprintf("LOCALCI_REPO_SLUG=%s/%s", r.cvr.getOwner(), r.cvr.getRepo())
r.env = append(r.env, repoSlug)

return nil
Expand Down Expand Up @@ -410,6 +410,9 @@ func (r *Repo) runTest(pr *PullRequest) error {
pr.Env = append(pr.Env, langEnv...)
}

// appends other environment variables
prNumber := fmt.Sprintf("LOCALCI_PR_NUMBER=%d", pr.Number)

// run stages
stages := []struct {
name string
Expand Down