-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We decide to centralize the CLI installation. Also, opening a way to inject any specific installer which helps our integration tests.
- Loading branch information
Showing
5 changed files
with
90 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,90 @@ | ||
version: 2.1 | ||
orbs: | ||
autify-cli: autify/autify-cli@dev:<<pipeline.git.revision>> | ||
node: circleci/node@5 | ||
orb-tools: circleci/[email protected] | ||
|
||
filters: &filters | ||
tags: | ||
only: /.*/ | ||
|
||
executors: | ||
windows: | ||
machine: | ||
resource_class: 'windows.medium' | ||
image: windows-server-2022-gui:current | ||
macos: | ||
macos: | ||
xcode: 14.0.0 | ||
|
||
jobs: | ||
# Create a job to test the commands of your orbs. | ||
# You may want to add additional validation steps to ensure the commands are working as expected. | ||
command-tests: | ||
executor: autify-cli/default | ||
default-tests: | ||
parameters: | ||
os: | ||
type: executor | ||
executor: << parameters.os >> | ||
shell: bash | ||
steps: | ||
- checkout | ||
# Run your orb's commands to validate them. | ||
- autify-cli/install | ||
- run: autify --version | ||
- run: echo token | autify web auth login | ||
- run: echo token | autify mobile auth login | ||
- run: autify connect client install | ||
|
||
specific-tests: | ||
parameters: | ||
os: | ||
type: executor | ||
executor: << parameters.os >> | ||
shell: bash | ||
steps: | ||
- autify-cli/install: | ||
version: 0.1.0 | ||
- run: autify --version | ||
shell-installer-url: "https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/beta/install-cicd.bash" | ||
- run: autify --version | grep beta | ||
- run: echo token | autify web auth login | ||
- run: echo token | autify mobile auth login | ||
- run: autify connect client install | ||
|
||
integration-tests: | ||
parameters: | ||
os: | ||
type: executor | ||
executor: << parameters.os >> | ||
shell: bash | ||
environment: | ||
AUTIFY_CLI_INTEGRATION_TEST_INSTALL: 1 | ||
AUTIFY_CONNECT_CLIENT_MODE: fake | ||
steps: | ||
- node/install: | ||
node-version: 16.17.0 | ||
- run: nvm use 16.17.0 | ||
- autify-cli/install | ||
- run: echo token | autify web auth login | ||
- run: echo token | autify mobile auth login | ||
- run: autify connect client install | ||
- run: autify-cli-integration-test | ||
|
||
workflows: | ||
test-deploy: | ||
jobs: | ||
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment. | ||
- command-tests: | ||
- default-tests: | ||
filters: *filters | ||
matrix: | ||
parameters: | ||
os: [autify-cli/default, macos, windows] | ||
- specific-tests: | ||
filters: *filters | ||
matrix: | ||
parameters: | ||
os: [autify-cli/default, macos, windows] | ||
- integration-tests: | ||
filters: *filters | ||
matrix: | ||
parameters: | ||
os: [autify-cli/default, macos, windows] | ||
- orb-tools/pack: | ||
filters: *filters | ||
- orb-tools/publish: | ||
|
@@ -34,7 +93,9 @@ workflows: | |
pub-type: production | ||
requires: | ||
- orb-tools/pack | ||
- command-tests | ||
- default-tests | ||
- specific-tests | ||
- integration-tests | ||
context: orb-publishing | ||
filters: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#!/bin/bash | ||
curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-standalone.sh | bash | ||
set -xe | ||
|
||
if [ "$PARAM_VERSION" != "stable" ]; then | ||
autify update -v "$PARAM_VERSION" | ||
fi | ||
: "${PARAM_SHELL_INSTALLER_URL:?"Provide the installer URL"}" | ||
|
||
cd "${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}" | ||
export AUTIFY_CLI_INSTALL_USE_CACHE=1 | ||
curl -L "$PARAM_SHELL_INSTALLER_URL" | bash -xe | ||
|
||
while IFS= read -r line; do | ||
echo "export PATH=$line:\$PATH" >> "$BASH_ENV" | ||
done < "./autify/path" |