Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI refactoring #2

Merged
merged 9 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/monthly-copyright-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Monthly Copyright Update

on:
workflow_dispatch:
inputs:
dryrun:
default: 'false'
description: Dry Run
schedule:
- cron: '0 0 1 * *'

jobs:
Monthly_Copyright_Update:
uses: 51Degrees/common-ci/.github/workflows/monthly-copyright-update.yml@main
with:
repo-name: ${{ github.event.repository.name }}
org-name: ${{ github.event.repository.owner.login }}
dryrun: ${{ inputs.dryrun }}
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/nightly-documentation-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Nightly Documentation Update

on:
workflow_dispatch:
inputs:
dryrun:
default: 'false'
description: Dry Run
schedule:
- cron: '0 1 * * *'

jobs:
Nightly_Documentation_Update:
uses: 51Degrees/common-ci/.github/workflows/nightly-documentation-update.yml@main
with:
repo-name: ${{ github.event.repository.name }}
org-name: ${{ github.event.repository.owner.login }}
dryrun: ${{ inputs.dryrun }}
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/nightly-prs-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Nightly PRs to Main

on:
workflow_dispatch:
inputs:
dryrun:
default: 'false'
description: Dry Run
schedule:
- cron: '0 1 * * *'

jobs:
Nightly_PRs_to_Main:
uses: 51Degrees/common-ci/.github/workflows/nightly-prs-to-main.yml@main
with:
repo-name: ${{ github.event.repository.name }}
org-name: ${{ github.event.repository.owner.login }}
dryrun: ${{ inputs.dryrun }}
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
asset-keys: '{"TestResourceKey": "${{ secrets.SUPER_RESOURCE_KEY}}"}'
22 changes: 22 additions & 0 deletions .github/workflows/nightly-publish-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Nightly Publish Main

on:
workflow_dispatch:
inputs:
dryrun:
default: 'false'
description: Dry Run
schedule:
- cron: '0 1 * * *'

jobs:
Nightly_Publish_Main:
uses: 51Degrees/common-ci/.github/workflows/nightly-publish-main.yml@main
with:
repo-name: ${{ github.event.repository.name }}
org-name: ${{ github.event.repository.owner.login }}
dryrun: ${{ inputs.dryrun }}
build-platform: ubuntu-latest
secrets:
token: ${{ secrets.ACCESS_TOKEN }}
asset-keys: '{"TestResourceKey": "${{ secrets.SUPER_RESOURCE_KEY}}", "PypiToken": "${{ secrets.PYPI_TOKEN }}"}'
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "ci/common-ci"]
path = ci/common-ci
url = ../common-ci
10 changes: 9 additions & 1 deletion ci/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# API Specific CI/CD Approach
This API complies with the `common-ci` approach.
This API complies with the `common-ci` approach.

The following secrets are required:
* `ACCESS_TOKEN` - GitHub [access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#about-personal-access-tokens) for cloning repos, creating PRs, etc.
* Example: `github_pat_l0ng_r4nd0m_s7r1ng`
* `SUPER_RESOURCE_KEY` - [resource key](https://51degrees.com/documentation/4.4/_info__resource_keys.html) for integration tests
* Example: `R4nd0m-S7r1ng`
* `PYPI_TOKEN` - [PyPI token](https://pypi.org/help/#apitoken) for publishing packages
* Example: `pypi-sUp3r-l0nG_r4nd0m-s7r1Ng`
36 changes: 0 additions & 36 deletions ci/build-and-test.yml

This file was deleted.

1 change: 1 addition & 0 deletions ci/build-package-requirements.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Write-Output "No pre-build requirements needed"
10 changes: 10 additions & 0 deletions ci/build-package.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
param (
[Parameter(Mandatory=$true)]
[string]$RepoName,
[Parameter(Mandatory=$true)]
[string]$Version
)

./python/build-package-pypi.ps1 -RepoName $RepoName -Version $Version -Packages .

exit $LASTEXITCODE
8 changes: 8 additions & 0 deletions ci/build-project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
param (
[Parameter(Mandatory=$true)]
[string]$RepoName
)

./python/build-project.ps1 -RepoName $RepoName -Packages .

exit $LASTEXITCODE
1 change: 0 additions & 1 deletion ci/common-ci
Submodule common-ci deleted from 705020
114 changes: 0 additions & 114 deletions ci/create-packages.yml

This file was deleted.

75 changes: 0 additions & 75 deletions ci/deploy-external.yml

This file was deleted.

Loading