From 4a75b8d7fa40af6aba03c1a9fc3bdf544399aa09 Mon Sep 17 00:00:00 2001 From: howardwu Date: Wed, 24 Feb 2021 22:22:29 -0800 Subject: [PATCH] Add leo login and logout to circleci --- .circleci/config.yml | 28 ++++++++++++++++++++++------ .circleci/leo-login-logout.sh | 7 +++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100755 .circleci/leo-login-logout.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 77b792799c..d758e2dadd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,6 +99,19 @@ jobs: export LEO=/home/circleci/project/project/bin/leo ./project/.circleci/leo-clean.sh + leo-setup: + docker: + - image: cimg/rust:1.50.0 + resource_class: xlarge + steps: + - attach_workspace: + at: /home/circleci/project/ + - run: + name: leo setup + command: | + export LEO=/home/circleci/project/project/bin/leo + ./project/.circleci/leo-setup.sh + leo-add-remove: docker: - image: cimg/rust:1.50.0 @@ -112,7 +125,7 @@ jobs: export LEO=/home/circleci/project/project/bin/leo ./project/.circleci/leo-add-remove.sh - leo-setup: + leo-login-logout: docker: - image: cimg/rust:1.50.0 resource_class: xlarge @@ -120,10 +133,10 @@ jobs: - attach_workspace: at: /home/circleci/project/ - run: - name: leo setup + name: leo login & logout command: | export LEO=/home/circleci/project/project/bin/leo - ./project/.circleci/leo-setup.sh + ./project/.circleci/leo-login-logout.sh workflows: version: 2 @@ -139,9 +152,12 @@ workflows: - leo-clean: requires: - rust-stable - - leo-add-remove: - requires: - - rust-stable - leo-setup: requires: - rust-stable + - leo-add-remove: + requires: + - rust-stable + - leo-login-logout: + requires: + - rust-stable \ No newline at end of file diff --git a/.circleci/leo-login-logout.sh b/.circleci/leo-login-logout.sh new file mode 100755 index 0000000000..1353b18d72 --- /dev/null +++ b/.circleci/leo-login-logout.sh @@ -0,0 +1,7 @@ +# leo login & logout + +$LEO new my-app && cd my-app || exit 1 +$LEO login -u "$ALEO_PM_USERNAME" -p "$ALEO_PM_PASSWORD" +$LEO add howard/silly-sudoku +$LEO remove silly-sudoku +$LEO logout