Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Semaphore CI Service Branch Config #37

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Fix Semaphore CI Service Branch Config #37

merged 1 commit into from
Aug 5, 2022

Conversation

jaredmoody
Copy link

According to the Semaphore Docs, SEMAPHORE_GIT_BRANCH is the branch targeted by the Pull Request, and SEMAPHORE_GIT_WORKING_BRANCH is the branch of the Pull Request.

@tagliala
Copy link
Owner

tagliala commented Aug 5, 2022

Thanks. Can you please also improve the semaphore spec?

describe '.define_service_params_for_semaphore' do
let(:semaphore_workflow_id) { 1234 }
let(:semaphore_git_branch) { 'a-branch' }
before do
allow(ENV).to receive(:[]).with('SEMAPHORE_WORKFLOW_ID').and_return(semaphore_workflow_id)
allow(ENV).to receive(:[]).with('SEMAPHORE_GIT_BRANCH').and_return(semaphore_git_branch)
end
it 'sets the expected parameters' do
config = {}
described_class.define_service_params_for_semaphore(config)
expect(config).to include(
service_name: 'semaphore',
service_number: semaphore_workflow_id,
service_branch: semaphore_git_branch
)
end
end

@tagliala tagliala self-requested a review August 5, 2022 07:28
Copy link
Owner

@tagliala tagliala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix specs

@coveralls
Copy link

coveralls commented Aug 5, 2022

Coverage Status

Coverage decreased (-2.2%) to 91.837% when pulling c7dc969 on jaredmoody:patch-1 into 286dfbe on tagliala:main.

@tagliala
Copy link
Owner

tagliala commented Aug 5, 2022

Ah sorry, errors are not related to this PR

According to the Semaphore Docs, SEMAPHORE_GIT_BRANCH is the branch _targeted_ by the Pull Request, and SEMAPHORE_GIT_WORKING_BRANCH is the branch _of_ the Pull Request.
@tagliala tagliala merged commit 630146b into tagliala:main Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants