Skip to content

Commit 5b12dc1

Browse files
committed
More CICD items
1 parent c089265 commit 5b12dc1

14 files changed

+308
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: u24_element_before_release
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- '**'
8+
tags-ignore:
9+
- '**'
10+
workflow_dispatch:
11+
12+
anchor-dev-build-call: &dev-build-call
13+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
14+
15+
anchor-test-build-call: &test-build-call
16+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
17+
18+
anchor-prod-build-call: &prod-build-call
19+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
20+
21+
jobs:
22+
call_context_check:
23+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
24+
call_u24_elements_build_alpine:
25+
!!merge <<: *$STAGE-build-call
26+
with:
27+
py_ver: 3.9
28+
image: djbase
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: u24_element_release_call
2+
3+
on:
4+
workflow_run:
5+
workflows: ["u24_element_tag_to_release"]
6+
types:
7+
- completed
8+
9+
anchor-dev-release-call: &dev-release-call
10+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
11+
12+
anchor-test-release-call: &test-release-call
13+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
14+
15+
anchor-prod-release-call: &prod-release-call
16+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
17+
18+
anchor-dev-release-if: &dev-release-if
19+
if: >-
20+
github.event.workflow_run.conclusion == 'success' &&
21+
github.repository_owner == 'yambottle' &&
22+
!contains(github.event.workflow_run.head_branch, 'test')
23+
24+
anchor-test-release-if: &test-release-if
25+
if: >-
26+
github.event.workflow_run.conclusion == 'success' &&
27+
github.repository_owner == 'yambottle' &&
28+
!contains(github.event.workflow_run.head_branch, 'test')
29+
30+
anchor-prod-release-if: &prod-release-if
31+
if: >-
32+
github.event.workflow_run.conclusion == 'success' &&
33+
github.repository_owner == 'datajoint' &&
34+
!contains(github.event.workflow_run.head_branch, 'test')
35+
36+
jobs:
37+
call_context_check:
38+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
39+
test_call_u24_elements_release_alpine:
40+
if: >-
41+
github.event.workflow_run.conclusion == 'success' &&
42+
( contains(github.event.workflow_run.head_branch, 'test') ||
43+
(github.event.workflow_run.event == 'pull_request'))
44+
!!merge <<: *$STAGE-release-call
45+
with:
46+
py_ver: 3.9
47+
twine_repo: testpypi
48+
secrets:
49+
TWINE_USERNAME: ${{secrets.TWINE_TEST_USERNAME}}
50+
TWINE_PASSWORD: ${{secrets.TWINE_TEST_PASSWORD}}
51+
52+
call_u24_elements_release_alpine:
53+
!!merge <<: *$STAGE-release-if
54+
!!merge <<: *$STAGE-release-call
55+
with:
56+
py_ver: 3.9
57+
secrets:
58+
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
59+
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: u24_element_tag_to_release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
- 'test*.*.*'
8+
9+
anchor-dev-build-call: &dev-build-call
10+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
11+
12+
anchor-test-build-call: &test-build-call
13+
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
14+
15+
anchor-prod-build-call: &prod-build-call
16+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
17+
18+
jobs:
19+
call_context_check:
20+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
21+
call_u24_elements_build_alpine:
22+
!!merge <<: *$STAGE-build-call
23+
with:
24+
py_ver: 3.9
25+
image: djbase
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# For Github Action that doesn't support anchor yet...
3+
# https://github.com/actions/runner/issues/1182
4+
# yq is not the version from pypi with the same name.
5+
6+
export STAGE=${1:-prod}
7+
# .yaml in .staging_workflows has to be named using a prefix, e.g., 'anchored_', this will be removed when normalizing
8+
PREFIX=${2:-anchored_}
9+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
10+
11+
run_yq() {
12+
local src_file
13+
local filename
14+
local target
15+
for src_file in "${SCRIPT_DIR}"/*.y*ml; do
16+
[[ ! -f ${src_file} ]] && continue
17+
filename=$(basename "$src_file")
18+
target="${SCRIPT_DIR}"/../workflows/${filename#"$PREFIX"}
19+
envsubst '${STAGE}' <"$src_file" | yq e 'explode(.) | del(.anchor-*)' >"$target"
20+
done
21+
}
22+
23+
run_yq
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
## Bug Report
11+
12+
### Description
13+
14+
A clear and concise description of what is the overall operation that is intended to be
15+
performed that resulted in an error.
16+
17+
### Reproducibility
18+
Include:
19+
- OS (WIN | MACOS | Linux)
20+
- DataJoint Element Version
21+
- MySQL Version
22+
- MySQL Deployment Strategy (local-native | local-docker | remote)
23+
- Minimum number of steps to reliably reproduce the issue
24+
- Complete error stack as a result of evaluating the above steps
25+
26+
### Expected Behavior
27+
A clear and concise description of what you expected to happen.
28+
29+
### Screenshots
30+
If applicable, add screenshots to help explain your problem.
31+
32+
### Additional Research and Context
33+
Add any additional research or context that was conducted in creating this report.
34+
35+
For example:
36+
- Related GitHub issues and PR's either within this repository or in other relevant
37+
repositories.
38+
- Specific links to specific lines or a focus within source code.
39+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: DataJoint Contribution Guideline
4+
url: https://docs.datajoint.org/python/community/02-Contribute.html
5+
about: Please make sure to review the DataJoint Contribution Guidelines
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for a new feature
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Request
11+
12+
### Problem
13+
14+
A clear and concise description how this idea has manifested and the context. Elaborate
15+
on the need for this feature and/or what could be improved. Ex. I'm always frustrated
16+
when [...]
17+
18+
### Requirements
19+
20+
A clear and concise description of the requirements to satisfy the new feature. Detail
21+
what you expect from a successful implementation of the feature. Ex. When using this
22+
feature, it should [...]
23+
24+
### Justification
25+
26+
Provide the key benefits in making this a supported feature. Ex. Adding support for this
27+
feature would ensure [...]
28+
29+
### Alternative Considerations
30+
31+
Do you currently have a work-around for this? Provide any alternative solutions or
32+
features you've considered.
33+
34+
### Related Errors
35+
Add any errors as a direct result of not exposing this feature.
36+
37+
Please include steps to reproduce provided errors as follows:
38+
- OS (WIN | MACOS | Linux)
39+
- DataJoint Element Version
40+
- MySQL Version
41+
- MySQL Deployment Strategy (local-native | local-docker | remote)
42+
- Minimum number of steps to reliably reproduce the issue
43+
- Complete error stack as a result of evaluating the above steps
44+
45+
### Screenshots
46+
If applicable, add screenshots to help explain your feature.
47+
48+
### Additional Research and Context
49+
Add any additional research or context that was conducted in creating this feature request.
50+
51+
For example:
52+
- Related GitHub issues and PR's either within this repository or in other relevant
53+
repositories.
54+
- Specific links to specific lines or a focus within source code.
55+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.
56+
- Any additional supplemental web references or links that would further justify this
57+
feature request.

.github/make-dev.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
bash ./.staging_workflows/normalize.sh dev

.github/make-prod.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
bash ./.staging_workflows/normalize.sh prod

.github/make-test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
bash ./.staging_workflows/normalize.sh test

0 commit comments

Comments
 (0)