Skip to content

Commit

Permalink
feat: implement circleci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-fully-ported authored Dec 19, 2023
1 parent 18cbeb0 commit 5d40692
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5d40692

Please sign in to comment.