From 5d4069281994ea45459b48341826d067a91c1974 Mon Sep 17 00:00:00 2001 From: jose-fully-ported <141160579+jose-fully-ported@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:32:17 -0500 Subject: [PATCH] feat: implement circleci workflow --- .circleci/config.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4175da6..f8c1c0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,33 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/configuration-reference/#executor-job + porter-deploy: docker: - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/configuration-reference/#steps steps: - checkout + - setup_remote_docker - run: - name: "Say hello" - command: "echo Hello, World!" + name: Set Github tag + command: | + echo "export sha_short=$(git rev-parse --short HEAD)" >> $BASH_ENV + - run: + name: "Setup porter" + command: | + /bin/bash -c "$(curl -fsSL https://install.porter.run)" + - run: + name: "Deploy stack" + command: "porter apply -f ./porter.yaml" + environment: + PORTER_CLUSTER: "1" + PORTER_HOST: https://newt-worthy-gazelle.ngrok-free.app + PORTER_PR_NUMBER: "$CIRCLE_PR_NUMBER" + PORTER_PROJECT: "1" + PORTER_STACK_NAME: circleci + PORTER_TAG: "$sha_short" + PORTER_TOKEN: "$PORTER_TOKEN_1_1" -# Orchestrate jobs using workflows -# See: https://circleci.com/docs/configuration-reference/#workflows workflows: - say-hello-workflow: + porter-deploy-workflow: jobs: - - say-hello + - porter-deploy