Skip to content

Commit

Permalink
Merge pull request #26 from CBroz1/main
Browse files Browse the repository at this point in the history
Add links to changelog
  • Loading branch information
JaerongA authored Oct 12, 2022
2 parents 4a98489 + 5b12dc1 commit 3789e4f
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 150 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: u24_element_before_release

on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
workflow_dispatch:

anchor-dev-build-call: &dev-build-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

anchor-test-build-call: &test-build-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

anchor-prod-build-call: &prod-build-call
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

jobs:
call_context_check:
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
call_u24_elements_build_alpine:
!!merge <<: *$STAGE-build-call
with:
py_ver: 3.9
image: djbase
59 changes: 59 additions & 0 deletions .github/.staging_workflows/anchored_u24_element_release_call.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: u24_element_release_call

on:
workflow_run:
workflows: ["u24_element_tag_to_release"]
types:
- completed

anchor-dev-release-call: &dev-release-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_release.yaml@main

anchor-test-release-call: &test-release-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_release.yaml@main

anchor-prod-release-call: &prod-release-call
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main

anchor-dev-release-if: &dev-release-if
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.repository_owner == 'yambottle' &&
!contains(github.event.workflow_run.head_branch, 'test')
anchor-test-release-if: &test-release-if
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.repository_owner == 'yambottle' &&
!contains(github.event.workflow_run.head_branch, 'test')
anchor-prod-release-if: &prod-release-if
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.repository_owner == 'datajoint' &&
!contains(github.event.workflow_run.head_branch, 'test')
jobs:
call_context_check:
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
test_call_u24_elements_release_alpine:
if: >-
github.event.workflow_run.conclusion == 'success' &&
( contains(github.event.workflow_run.head_branch, 'test') ||
(github.event.workflow_run.event == 'pull_request'))
!!merge <<: *$STAGE-release-call
with:
py_ver: 3.9
twine_repo: testpypi
secrets:
TWINE_USERNAME: ${{secrets.TWINE_TEST_USERNAME}}
TWINE_PASSWORD: ${{secrets.TWINE_TEST_PASSWORD}}

call_u24_elements_release_alpine:
!!merge <<: *$STAGE-release-if
!!merge <<: *$STAGE-release-call
with:
py_ver: 3.9
secrets:
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: u24_element_tag_to_release

on:
push:
tags:
- '*.*.*'
- 'test*.*.*'

anchor-dev-build-call: &dev-build-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

anchor-test-build-call: &test-build-call
uses: yambottle/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

anchor-prod-build-call: &prod-build-call
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main

jobs:
call_context_check:
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
call_u24_elements_build_alpine:
!!merge <<: *$STAGE-build-call
with:
py_ver: 3.9
image: djbase
23 changes: 23 additions & 0 deletions .github/.staging_workflows/normalize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# For Github Action that doesn't support anchor yet...
# https://github.com/actions/runner/issues/1182
# yq is not the version from pypi with the same name.

export STAGE=${1:-prod}
# .yaml in .staging_workflows has to be named using a prefix, e.g., 'anchored_', this will be removed when normalizing
PREFIX=${2:-anchored_}
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

run_yq() {
local src_file
local filename
local target
for src_file in "${SCRIPT_DIR}"/*.y*ml; do
[[ ! -f ${src_file} ]] && continue
filename=$(basename "$src_file")
target="${SCRIPT_DIR}"/../workflows/${filename#"$PREFIX"}
envsubst '${STAGE}' <"$src_file" | yq e 'explode(.) | del(.anchor-*)' >"$target"
done
}

run_yq
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

## Bug Report

### Description

A clear and concise description of what is the overall operation that is intended to be
performed that resulted in an error.

### Reproducibility
Include:
- OS (WIN | MACOS | Linux)
- DataJoint Element Version
- MySQL Version
- MySQL Deployment Strategy (local-native | local-docker | remote)
- Minimum number of steps to reliably reproduce the issue
- Complete error stack as a result of evaluating the above steps

### Expected Behavior
A clear and concise description of what you expected to happen.

### Screenshots
If applicable, add screenshots to help explain your problem.

### Additional Research and Context
Add any additional research or context that was conducted in creating this report.

For example:
- Related GitHub issues and PR's either within this repository or in other relevant
repositories.
- Specific links to specific lines or a focus within source code.
- Relevant summary of Maintainers development meetings, milestones, projects, etc.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: DataJoint Contribution Guideline
url: https://docs.datajoint.org/python/community/02-Contribute.html
about: Please make sure to review the DataJoint Contribution Guidelines
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Feature request
about: Suggest an idea for a new feature
title: ''
labels: 'enhancement'
assignees: ''

---

## Feature Request

### Problem

A clear and concise description how this idea has manifested and the context. Elaborate
on the need for this feature and/or what could be improved. Ex. I'm always frustrated
when [...]

### Requirements

A clear and concise description of the requirements to satisfy the new feature. Detail
what you expect from a successful implementation of the feature. Ex. When using this
feature, it should [...]

### Justification

Provide the key benefits in making this a supported feature. Ex. Adding support for this
feature would ensure [...]

### Alternative Considerations

Do you currently have a work-around for this? Provide any alternative solutions or
features you've considered.

### Related Errors
Add any errors as a direct result of not exposing this feature.

Please include steps to reproduce provided errors as follows:
- OS (WIN | MACOS | Linux)
- DataJoint Element Version
- MySQL Version
- MySQL Deployment Strategy (local-native | local-docker | remote)
- Minimum number of steps to reliably reproduce the issue
- Complete error stack as a result of evaluating the above steps

### Screenshots
If applicable, add screenshots to help explain your feature.

### Additional Research and Context
Add any additional research or context that was conducted in creating this feature request.

For example:
- Related GitHub issues and PR's either within this repository or in other relevant
repositories.
- Specific links to specific lines or a focus within source code.
- Relevant summary of Maintainers development meetings, milestones, projects, etc.
- Any additional supplemental web references or links that would further justify this
feature request.
2 changes: 2 additions & 0 deletions .github/make-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
bash ./.staging_workflows/normalize.sh dev
2 changes: 2 additions & 0 deletions .github/make-prod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
bash ./.staging_workflows/normalize.sh prod
2 changes: 2 additions & 0 deletions .github/make-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
bash ./.staging_workflows/normalize.sh test
7 changes: 7 additions & 0 deletions .github/run-act.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
bash $SCRIPT_DIR/.staging_workflows/normalize.sh dev
cd ..
act -P ubuntu-latest=drewyangdev/ubuntu:act-latest \
--secret-file $SCRIPT_DIR/.test/.secrets \
--artifact-server-path $SCRIPT_DIR/.test/artifacts/
Loading

0 comments on commit 3789e4f

Please sign in to comment.