Skip to content

Commit

Permalink
[#102] fix pause logic, bump and optimize builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lispyclouds committed May 13, 2021
1 parent 51152c8 commit 223e663
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 36 deletions.
39 changes: 5 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: "Prepare tools-deps"
uses: "DeLaGuardo/setup-clojure@master"
with:
cli: "1.10.3.814"
cli: "1.10.3.833"

- name: "Apply Cache"
uses: "actions/cache@v2"
Expand All @@ -49,46 +49,17 @@ jobs:
- name: "Setup Babashka"
uses: "turtlequeue/[email protected]"
with:
babashka-version: 0.3.5

- name: "Run end to end tests"
run: "make e2e"
babashka-version: 0.4.0

- name: "Build JARs"
run: "make -j3 compile"

- name: "Collect Artifacts"
uses: "actions/upload-artifact@v2"
with:
name: "bob-jars"
path: |
entities/entities.jar
runner/runner.jar
apiserver/apiserver.jar
build-and-push:
needs: "test"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"

- name: "Download Artifacts"
uses: "actions/download-artifact@v2"
with:
name: "bob-jars"
path: "artifacts"

- name: "Move Docker images"
run: |
mv artifacts/entities/entities.jar entities/ && \
mv artifacts/runner/runner.jar runner/ && \
mv artifacts/apiserver/apiserver.jar apiserver/
- name: "Build Docker images"
run: "make -j3 docker-image"

- name: "Run end to end tests"
run: "make e2e"

- name: "Publish Docker images"
if: github.ref == 'refs/heads/main'
run: |
Expand Down
2 changes: 1 addition & 1 deletion apiserver/resources/bob/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ paths:
examples:
success:
value:
message: "Pipeline cannot be paused now. Try again when running or stop it."
message: "Pipeline cannot be paused/is already paused now. Try again when running or stop it."

"/pipelines/unpause/groups/{group}/names/{name}/runs/{id}":
post:
Expand Down
2 changes: 1 addition & 1 deletion apiserver/src/apiserver/handlers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
{{pipeline-info :path} :parameters
db :db
queue :queue}]
(if (not (pausable? db (:id pipeline-info)))
(if (and pause? (not (pausable? db (:id pipeline-info))))
(respond "Pipeline cannot be paused/is already paused now. Try again when running or stop it." 422)
(exec #(publish queue
(if pause?
Expand Down

0 comments on commit 223e663

Please sign in to comment.