Skip to content

Commit 2478ff8

Browse files
committed
Add default env_file
1 parent b062ef9 commit 2478ff8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_upload_pipeline_action.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module Fastlane
22
module Actions
33
class BuildkiteUploadPipelineAction < Action
4+
DEFAULT_ENV_FILE = File.join('.buildkite', 'shared-pipeline-vars').freeze
5+
DEFAULT_COMMIT = 'HEAD'.freeze
6+
47
def self.run(params)
58
env_file = params[:env_file]
69
pipeline_file = params[:pipeline_file]
@@ -44,6 +47,7 @@ def self.available_options
4447
key: :env_file,
4548
description: 'The path to a bash file to be sourced before uploading the pipeline',
4649
optional: true,
50+
default_value: DEFAULT_ENV_FILE,
4751
type: String
4852
),
4953
FastlaneCore::ConfigItem.new(
@@ -56,7 +60,7 @@ def self.available_options
5660
key: :commit,
5761
description: 'The commit hash you want to run the pipeline on',
5862
optional: true,
59-
default_value: 'HEAD',
63+
default_value: DEFAULT_COMMIT,
6064
type: String
6165
),
6266
]

spec/buildkite_upload_pipeline_action_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let(:pipeline_file) { 'path/to/pipeline.yml' }
55
let(:branch) { 'feature-branch' }
66
let(:commit) { 'abc123' }
7-
let(:commit_default) { 'HEAD' }
7+
let(:commit_default) { Fastlane::Actions::BuildkiteUploadPipelineAction::DEFAULT_COMMIT }
88

99
before do
1010
allow(File).to receive(:exist?).with(anything)

0 commit comments

Comments
 (0)