examples/circleci.yml in cpl-1.0.0 vs examples/circleci.yml in cpl-1.0.1

- old
+ new

@@ -6,12 +6,12 @@ build-staging: docker: - image: cimg/ruby:3.1-node resource_class: large environment: - CPLN_ORG: myorg - APP_NAME: myapp-staging + CPLN_ORG: my-org + APP_NAME: my-app-staging steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: @@ -19,18 +19,17 @@ command: | sudo npm install -g @controlplane/cli && cpln --version cpln profile create default --token ${CPLN_TOKEN} --org ${CPLN_ORG} --gvc ${APP_NAME} cpln image docker-login - git clone https://github.com/shakacode/heroku-to-control-plane ~/heroku-to-control-plane - sudo ln -s ~/heroku-to-control-plane/cpl /usr/local/bin/cpl + gem install cpl - run: name: Containerize and push image command: cpl build-image -a ${APP_NAME} - run: name: Database tasks - command: cpl run:detached rails db:migrate -a ${APP_NAME} --image latest + command: cpl run:detached -a ${APP_NAME} --image latest -- rails db:migrate - run: name: Deploy image command: cpl deploy-image -a ${APP_NAME} # Example config for review app: @@ -41,11 +40,11 @@ build-review-app: docker: - image: cimg/ruby:3.1-node resource_class: large environment: - CPLN_ORG: my-org-name + CPLN_ORG: my-org steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: @@ -63,11 +62,11 @@ git clone https://github.com/shakacode/heroku-to-control-plane ~/heroku-to-control-plane sudo ln -s ~/heroku-to-control-plane/cpl /usr/local/bin/cpl - run: name: Provision review app if needed command: | - if ! cpl exist -a ${APP_NAME}; then + if ! cpl exists -a ${APP_NAME}; then cpl setup-app -a ${APP_NAME} echo "export NEW_APP=true" >> $BASH_ENV fi - run: name: Containerize and push image @@ -75,12 +74,12 @@ cpl build-image -a ${APP_NAME} --commit ${CIRCLE_SHA1::7} - run: name: Database tasks command: | if [ -n "${NEW_APP}" ]; then - cpl run:detached 'LOG_LEVEL=warn rails db:reset' -a ${APP_NAME} --image latest + cpl run:detached -a ${APP_NAME} --image latest -- LOG_LEVEL=warn rails db:reset else - cpl run:detached 'LOG_LEVEL=warn rails db:migrate' -a ${APP_NAME} --image latest + cpl run:detached -a ${APP_NAME} --image latest -- LOG_LEVEL=warn rails db:migrate fi - run: name: Deploy image command: cpl deploy-image -a ${APP_NAME}