From d58c15ead5f72a6cd0482bf198ae10b33e4d7166 Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Thu, 3 Sep 2015 18:14:56 +0200 Subject: [PATCH 1/5] new format --- .gitignore | 1 + _tests/test_ok.sh | 6 +++--- _tests/test_wrong.sh | 6 +++--- step.sh | 14 ++++++------- step.yml | 50 ++++++++++++++++++++++++++++---------------- 5 files changed, 46 insertions(+), 31 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6397b46 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.bitrise* diff --git a/_tests/test_ok.sh b/_tests/test_ok.sh index bcb97c5..c4643bc 100644 --- a/_tests/test_ok.sh +++ b/_tests/test_ok.sh @@ -7,9 +7,9 @@ THIS_SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "${THIS_SCRIPTDIR}" -export SSH_RSA_PRIVATE_KEY=$( "${CONFIG_ssh_key_file_path}" +echo "${ssh_rsa_private_key}" > "${CONFIG_ssh_key_file_path}" if [ $? -ne 0 ] ; then write_section_to_formatted_output "# Error" echo_string_to_formatted_output "* Failed to write the SSH key to the provided path" diff --git a/step.yml b/step.yml index 4f40b15..3146dd4 100644 --- a/step.yml +++ b/step.yml @@ -1,7 +1,6 @@ ---- -name: | - Activate SSH key (RSA private key) -description: | +title: Activate SSH key (RSA private key) +summary: Activate SSH key (RSA private key) +description: |- Saves the provided **RSA private SSH key** to file and then loads it into the user's ssh-agent with `ssh-add`. @@ -12,25 +11,40 @@ description: | It will start the ssh-agent if it can't connect to the agent. website: https://github.com/bitrise-io/steps-activate-ssh-key +source_code_url: https://github.com/bitrise-io/steps-activate-ssh-key +support_url: https://github.com/bitrise-io/steps-activate-ssh-key/issues source: git: https://github.com/bitrise-io/steps-activate-ssh-key.git host_os_tags: - osx-10.9 +project_type_tags: + - ios type_tags: - ssh requires_admin_user: false - +is_always_run: false +is_skippable: false inputs: - - title: | - SSH private key in RSA format - mapped_to: SSH_RSA_PRIVATE_KEY - is_expand: false - - title: | - (Optional) path to save the private key. Default is: $HOME/.ssh/steplib_ssh_step_id_rsa - mapped_to: SSH_KEY_SAVE_PATH - is_expand: true - - title: | - (Optional) Remove other, previously loaded keys and restart ssh-agent? - Options: true and false. Default: true. - mapped_to: IS_REMOVE_OTHER_IDENTITIES - is_expand: false + - ssh_rsa_private_key: "$SSH_RSA_PRIVATE_KEY" + opts: + title: SSH private key in RSA format + is_expand: true + is_dont_change_value: true + - ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa" + opts: + title: |- + (Optional) path to save the private key. Default is: $HOME/.ssh/steplib_ssh_step_id_rsa + is_expand: true + is_dont_change_value: true + - is_remove_other_identities: "true" + opts: + description: |- + (Optional) Remove other, previously loaded keys and restart ssh-agent? + + Options: + + * "true" + * "false" + is_expand: false + value_options: ["true", "false"] + is_dont_change_value: true From eccb034dc2de82664c9c4908ec042761eab6f43d Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Thu, 3 Sep 2015 18:35:55 +0200 Subject: [PATCH 2/5] yml fix, gitignore --- .gitignore | 1 + step.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6397b46..69e2be0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .bitrise* +ssh/ diff --git a/step.yml b/step.yml index 3146dd4..da90217 100644 --- a/step.yml +++ b/step.yml @@ -24,6 +24,7 @@ type_tags: requires_admin_user: false is_always_run: false is_skippable: false +run_if: ".IsCI" inputs: - ssh_rsa_private_key: "$SSH_RSA_PRIVATE_KEY" opts: From 716991fe51e981e465c9bec327fbaa2fe8f391cd Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Thu, 3 Sep 2015 18:59:37 +0200 Subject: [PATCH 3/5] bitrise --- bitrise.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bitrise.yml diff --git a/bitrise.yml b/bitrise.yml new file mode 100644 index 0000000..45b961d --- /dev/null +++ b/bitrise.yml @@ -0,0 +1,9 @@ +format_version: 0.9.10 +default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git + +workflows: + test: + steps: + - path::./: + run_if: true + inputs: From 4ae8214da04fd43e4426bc9f6d9157dc6051d579 Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Thu, 3 Sep 2015 19:04:13 +0200 Subject: [PATCH 4/5] fixes --- bitrise.yml | 8 ++++++++ step.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 45b961d..d7e5f88 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -1,9 +1,17 @@ format_version: 0.9.10 default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git +app: + envs: + # define these in your .bitrise.secrets.yml + - TEST_SSH_RSA_PRIVATE_KEY: + workflows: test: steps: - path::./: run_if: true inputs: + - ssh_rsa_private_key: $TEST_SSH_RSA_PRIVATE_KEY + - ssh_key_save_path: "$HOME/.ssh/bitrise_step_activate_ssh_key" + - is_remove_other_identities: "true" diff --git a/step.yml b/step.yml index da90217..ff6a5de 100644 --- a/step.yml +++ b/step.yml @@ -31,7 +31,7 @@ inputs: title: SSH private key in RSA format is_expand: true is_dont_change_value: true - - ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa" + - ssh_key_save_path: "$HOME/.ssh/bitrise_step_activate_ssh_key" opts: title: |- (Optional) path to save the private key. Default is: $HOME/.ssh/steplib_ssh_step_id_rsa From 55725495b4605e551a535623e7554d5972a124ba Mon Sep 17 00:00:00 2001 From: Krisztian Goedrei Date: Thu, 3 Sep 2015 19:07:36 +0200 Subject: [PATCH 5/5] removed source --- step.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/step.yml b/step.yml index ff6a5de..747a88a 100644 --- a/step.yml +++ b/step.yml @@ -13,8 +13,6 @@ description: |- website: https://github.com/bitrise-io/steps-activate-ssh-key source_code_url: https://github.com/bitrise-io/steps-activate-ssh-key support_url: https://github.com/bitrise-io/steps-activate-ssh-key/issues -source: - git: https://github.com/bitrise-io/steps-activate-ssh-key.git host_os_tags: - osx-10.9 project_type_tags: