Skip to content

Commit

Permalink
Merge branch 'auth-changes' of https://github.com/sumesh-aot/spiff-arena
Browse files Browse the repository at this point in the history
 into auth-changes
  • Loading branch information
sumesh-aot committed Jul 4, 2024
2 parents 698dc4a + 399d328 commit f6cb5d7
Show file tree
Hide file tree
Showing 234 changed files with 7,192 additions and 2,670 deletions.
2 changes: 0 additions & 2 deletions .darglint

This file was deleted.

49 changes: 0 additions & 49 deletions .flake8

This file was deleted.

3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 1
ignore:
- dependency-name: "gunicorn"
versions: ["22.0.0"]

# NPM
- package-ecosystem: npm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image For Main Builds
name: Build Docker Images
# we want to be able to sort by tag name to find the newest and trace back to source control
# on every commit to main:
# frontend:main-20230223164322-b8becd1-45
Expand Down Expand Up @@ -30,6 +30,7 @@ on:
push:
branches:
- main
tags: [v*]

jobs:
create_frontend_docker_image:
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
run: echo "date=$(date -u +'%Y-%m-%d_%H-%M-%S')" >> "$GITHUB_OUTPUT"
- name: Get short commit sha
id: commit_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
Expand All @@ -68,14 +69,16 @@ jobs:
org.opencontainers.image.description=Frontend component of SpiffWorkflow, a software development platform for building, running, and monitoring executable diagrams
org.opencontainers.image.version=${{ env.BRANCH_NAME }}-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
tags: |
type=ref,event=branch,suffix=-latest
type=ref,event=branch,branch=main,suffix=-latest
type=ref,event=branch,suffix=-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
type=ref,event=tag,enable=true,format={{version}}
type=ref,event=tag,enable=true,format=latest
- name: Write app version info
working-directory: spiffworkflow-frontend
run: echo "$DOCKER_METADATA_OUTPUT_JSON" | jq '.labels' > version_info.json
- name: Build and push Frontend Docker image
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
# this action doesn't seem to respect working-directory so set context
context: spiffworkflow-frontend
Expand Down Expand Up @@ -112,7 +115,7 @@ jobs:
run: echo "date=$(date -u +'%Y-%m-%d_%H-%M-%S')" >> "$GITHUB_OUTPUT"
- name: Get short commit sha
id: commit_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
Expand All @@ -122,14 +125,16 @@ jobs:
org.opencontainers.image.description=Backend component of SpiffWorkflow, a software development platform for building, running, and monitoring executable diagrams
org.opencontainers.image.version=${{ env.BRANCH_NAME }}-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
tags: |
type=ref,event=branch,suffix=-latest
type=ref,event=branch,branch=main,suffix=-latest
type=ref,event=branch,suffix=-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
type=ref,event=tag,enable=true,format={{version}}
type=ref,event=tag,enable=true,format=latest
- name: Write app version info
working-directory: spiffworkflow-backend
run: echo "$DOCKER_METADATA_OUTPUT_JSON" | jq '.labels' > version_info.json
- name: Build and push Backend Docker image
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
# this action doesn't seem to respect working-directory so set context
context: spiffworkflow-backend
Expand Down Expand Up @@ -167,7 +172,7 @@ jobs:
run: echo "date=$(date -u +'%Y-%m-%d_%H-%M-%S')" >> "$GITHUB_OUTPUT"
- name: Get short commit sha
id: commit_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
Expand All @@ -177,11 +182,13 @@ jobs:
org.opencontainers.image.description=spiffworkflow-connector-proxy-demo
org.opencontainers.image.version=${{ env.BRANCH_NAME }}-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
tags: |
type=ref,event=branch,suffix=-latest
type=ref,event=branch,branch=main,suffix=-latest
type=ref,event=branch,suffix=-${{ steps.date.outputs.date }}-${{ steps.commit_sha.outputs.sha_short }}
type=ref,event=tag,enable=true,format={{version}}
type=ref,event=tag,enable=true,format=latest
- name: Build and push the connector proxy
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
# this action doesn't seem to respect working-directory so set context
context: connector-proxy-demo
Expand All @@ -191,3 +198,41 @@ jobs:
platforms: linux/amd64,linux/arm64
- name: Adding markdown
run: echo 'TAGS ${{ steps.meta.outputs.tags }}' >> "$GITHUB_STEP_SUMMARY"

quickstart-guide-test:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs:
[
create_frontend_docker_image,
create_backend_docker_image,
create_demo_proxy_docker_image,
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Apps
run: ./bin/run_arena_with_docker_compose
- name: wait_for_backend
working-directory: ./spiffworkflow-backend
run: ./bin/wait_for_backend_to_be_up 5 8000
- name: wait_for_frontend
working-directory: ./spiffworkflow-frontend
run: ./bin/wait_for_frontend_to_be_up 5 8001
- name: wait_for_connector
working-directory: ./connector-proxy-demo
run: ./bin/wait_for_connector_to_be_up 5 8004
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: ./spiffworkflow-frontend
browser: chromium
# just run one test to make sure we didn't completely break it
spec: cypress/e2e/process_groups.cy.js
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK: "false"
CYPRESS_SPIFFWORKFLOW_FRONTEND_USERNAME: "admin"
CYPRESS_SPIFFWORKFLOW_FRONTEND_PASSWORD: "admin"
SPIFFWORKFLOW_FRONTEND_PORT: 8001
2 changes: 1 addition & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pip==24.0
pip==24.1.1
poetry==1.8.3
147 changes: 0 additions & 147 deletions .github/workflows/release_builds.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Snyk CLI to check for security issues
# Snyk can be used to break the build when it detects security issues.
# In this case we want to upload the SAST issues to GitHub Code Scanning
uses: snyk/actions/setup@d406fd286b663eb8c6f8adcced4f7bcd199c0a3f
uses: snyk/actions/setup@a1346e4eaf761d462da22c34c681dc06849b6851
env:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Set up Snyk CLI to check for security issues
# Snyk can be used to break the build when it detects security issues.
# In this case we want to upload the SAST issues to GitHub Code Scanning
uses: snyk/actions/setup@d406fd286b663eb8c6f8adcced4f7bcd199c0a3f
uses: snyk/actions/setup@a1346e4eaf761d462da22c34c681dc06849b6851
env:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ jobs:
./bin/run_ci_session coverage
- name: Upload coverage report
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4.5.0

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@v2.2.0
uses: sonarsource/sonarcloud-github-action@v2.3.0
# thought about just skipping dependabot
# if: ${{ github.actor != 'dependabot[bot]' }}
# but figured all pull requests seems better, since none of them will have access to sonarcloud.
Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
# if: ${{ github.event_name != 'pull_request' }}
# so just skip everything but main
if: github.ref_name == 'main'
uses: sonarsource/sonarcloud-github-action@v2.2.0
uses: sonarsource/sonarcloud-github-action@v2.3.0
with:
projectBaseDir: spiffworkflow-frontend
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ process_models/
.cache
.mypy_cache
.aider*
/spiffworkflow_docker_compose
Loading

0 comments on commit f6cb5d7

Please sign in to comment.