Skip to content

Commit 0ca5ff5

Browse files
Rd 10787 separate build from prep (#59)
* chore: use pre-build job, add github action
1 parent f5563e3 commit 0ca5ff5

File tree

3 files changed

+54
-12
lines changed

3 files changed

+54
-12
lines changed

.circleci/config.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,33 @@ workflows:
3636
requires:
3737
- lumigo-orb/is_environment_available
3838

39+
- lumigo-orb/pre_build_artifacts:
40+
context: common
41+
requires:
42+
- lumigo-orb/is_environment_available
43+
3944
- lumigo-orb/integration-test-prep:
4045
context:
4146
- common
4247
- java
43-
deploy_spec: java
4448
install_maven_dependencies: true
49+
pre_builds_available: true
4550
run_test_cleanup: false
4651
requires:
4752
- lumigo-orb/be-deploy
53+
- lumigo-orb/pre_build_artifacts
4854

4955
- lumigo-orb/integration-test-cleanup:
5056
name: pre-test-cleanup
5157
context: common
5258
requires:
5359
- lumigo-orb/integration-test-prep
5460

55-
- lumigo-orb/integration-test-limited-flows:
56-
context: common
57-
deploy_spec: java
58-
run_test_cleanup: false
59-
requires:
60-
- pre-test-cleanup
61-
6261
- lumigo-orb/integration-test-parallel:
6362
context: common
64-
deploy_spec: java
6563
run_test_cleanup: false
6664
requires:
67-
- lumigo-orb/integration-test-limited-flows
65+
- pre-test-cleanup
6866

6967
- lumigo-orb/integration-test-cleanup:
7068
name: post-test-cleanup
@@ -75,7 +73,7 @@ workflows:
7573
- lumigo-orb/e2e-test:
7674
context: common
7775
requires:
78-
- lumigo-orb/integration-test-limited-flows
76+
- pre-test-cleanup
7977

8078
- lumigo-orb/workflow-completed-successfully:
8179
context: common

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Send PR close event to the environment manager
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
send-pr-close-event-to-env-manager:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Send PR Close Event To Env Manager
12+
run: |
13+
full_repository_name="${{github.repository}}"
14+
# the repository name is everything after the slash "lumigo-io/" in the full repository name
15+
repository_name="${full_repository_name#lumigo-io/}"
16+
17+
source_branch_name="${{github.head_ref}}"
18+
19+
is_merged="${{github.event.pull_request.merged}}"
20+
if [ "$is_merged" = "true" ]; then
21+
event="PR_MERGED"
22+
else
23+
event="PR_CLOSED"
24+
fi
25+
26+
request_type="POST"
27+
route="v1/github_actions_trigger"
28+
29+
body="{"
30+
body+=" \"event\": \"${event}\""
31+
body+=" , \"repository_name\": \"${repository_name}\""
32+
body+=" , \"source_branch_name\": \"${source_branch_name}\""
33+
body+="}"
34+
35+
params=(\
36+
-s \
37+
--header "x-api-key: ${{secrets.ENV_MANAGER_API_KEY}}" \
38+
--header "Content-Type: application/json" \
39+
--compressed \
40+
--request "$request_type" \
41+
--data "$body")
42+
43+
# ENV_MANAGER_API_ROOT="https://XXXX.execute-api.us-west-2.amazonaws.com/prod/env-manager/v1"
44+
params+=("${{secrets.ENV_MANAGER_API_ROOT}}/${route}")
45+
curl "${params[@]}" | tr -d '\r'

0 commit comments

Comments
 (0)