Skip to content

Commit d113c3c

Browse files
authored
Merge pull request #4 from postindustria-tech/upstream-pr
CI refactoring
2 parents fddfda7 + 9b16502 commit d113c3c

30 files changed

+178
-203
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Monthly Copyright Update
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dryrun:
7+
default: 'true'
8+
description: Dry Run
9+
schedule:
10+
- cron: '0 1 1 * *'
11+
12+
jobs:
13+
Monthly_Copyright_Update:
14+
uses: 51Degrees/common-ci/.github/workflows/monthly-copyright-update.yml@main
15+
with:
16+
repo-name: ${{ github.event.repository.name }}
17+
org-name: ${{ github.event.repository.owner.login }}
18+
dryrun: ${{ inputs.dryrun || false }}
19+
secrets:
20+
token: ${{ secrets.ACCESS_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Nightly PRs to Main
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dryrun:
7+
default: 'true'
8+
description: Dry Run
9+
schedule:
10+
- cron: '0 1 * * *'
11+
12+
jobs:
13+
Nightly_PRs_to_Main:
14+
uses: 51Degrees/common-ci/.github/workflows/nightly-prs-to-main.yml@main
15+
with:
16+
repo-name: ${{ github.event.repository.name }}
17+
org-name: ${{ github.event.repository.owner.login }}
18+
dryrun: ${{ inputs.dryrun || false }}
19+
secrets:
20+
token: ${{ secrets.ACCESS_TOKEN }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Nightly Publish Main
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dryrun:
7+
default: 'true'
8+
description: Dry Run
9+
schedule:
10+
- cron: '0 1 * * *'
11+
12+
jobs:
13+
Nightly_Publish_Main:
14+
uses: 51Degrees/common-ci/.github/workflows/nightly-publish-main.yml@main
15+
with:
16+
repo-name: ${{ github.event.repository.name }}
17+
org-name: ${{ github.event.repository.owner.login }}
18+
dryrun: ${{ inputs.dryrun || false }}
19+
build-platform: ubuntu-latest
20+
secrets:
21+
token: ${{ secrets.ACCESS_TOKEN }}
22+
asset-keys: '{}'

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "ci/common-ci"]
2-
path = ci/common-ci
3-
url = ../common-ci

PipelineBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct($settings = array())
3737
$this->pipelines = [];
3838

3939
if (isset($settings["addJavaScriptBuilder"])) {
40-
$this->addJavaScriptBuilder = $settings["addJavascriptBuilder"];
40+
$this->addJavaScriptBuilder = $settings["addJavaScriptBuilder"];
4141
} else {
4242
$this->addJavaScriptBuilder = true;
4343
}

ci/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# API Specific CI/CD Approach
2-
This API complies with the `common-ci` approach.
2+
This API complies with the `common-ci` approach.
3+
4+
The following secrets are required:
5+
* `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.
6+
* Example: `github_pat_l0ng_r4nd0m_s7r1ng`

ci/build-and-test.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

ci/build-package-requirements.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-Output "No pre-build requirements needed"

ci/build-package.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./php/build-package-composer.ps1

ci/build-project.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
param (
2+
[Parameter(Mandatory=$true)]
3+
[string]$RepoName
4+
)
5+
6+
./php/build-project.ps1 -RepoName $RepoName
7+
8+
exit $LASTEXITCODE

ci/common-ci

Lines changed: 0 additions & 1 deletion
This file was deleted.

ci/deploy.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

ci/fetch-assets.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-Output "No assets needed"

ci/get-next-package-version.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
param (
2+
[Parameter(Mandatory=$true)]
3+
[string]$RepoName,
4+
[Parameter(Mandatory=$true)]
5+
[string]$VariableName
6+
)
7+
8+
./php/get-next-package-version.ps1 -RepoName $RepoName -VariableName $VariableName
9+
10+
exit $LASTEXITCODE

ci/install-package.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
param (
2+
[Parameter(Mandatory=$true)]
3+
[string]$RepoName,
4+
[Parameter(Mandatory=$true)]
5+
[string]$Version
6+
)
7+
8+
./php/build-project.ps1 -RepoName $RepoName
9+
10+
exit $LASTEXITCODE

ci/options.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[
2+
{
3+
"Name": "Ubuntu_PHP_8.2",
4+
"Image": "ubuntu-latest",
5+
"Language": "php",
6+
"LanguageVersion": "8.2",
7+
"RunPerformance": true,
8+
"PackageRequirement": true
9+
},
10+
{
11+
"Name": "macOS_PHP_8.2",
12+
"Image": "macos-latest",
13+
"Language": "php",
14+
"LanguageVersion": "8.2",
15+
"RunPerformance": true,
16+
"PackageRequirement": true
17+
},
18+
{
19+
"Name": "Ubuntu_PHP_8.1",
20+
"Image": "ubuntu-latest",
21+
"Language": "php",
22+
"LanguageVersion": "8.1",
23+
"RunPerformance": true,
24+
"PackageRequirement": true
25+
},
26+
{
27+
"Name": "macOS_PHP_8.1",
28+
"Image": "macos-latest",
29+
"Language": "php",
30+
"LanguageVersion": "8.1",
31+
"RunPerformance": true,
32+
"PackageRequirement": true
33+
},
34+
{
35+
"Name": "Ubuntu_PHP_8.0",
36+
"Image": "ubuntu-latest",
37+
"Language": "php",
38+
"LanguageVersion": "8.0",
39+
"RunPerformance": true,
40+
"PackageRequirement": true
41+
},
42+
{
43+
"Name": "macOS_PHP_8.0",
44+
"Image": "macos-latest",
45+
"Language": "php",
46+
"LanguageVersion": "8.0",
47+
"RunPerformance": true,
48+
"PackageRequirement": true
49+
}
50+
]

ci/publish-package.ps1

Whitespace-only changes.

ci/run-integration-tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-Output "There are no integration tests"

ci/run-performance-tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-Output "There are no performance tests"

ci/run-unit-tests.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
param (
2+
[Parameter(Mandatory=$true)]
3+
[string]$RepoName
4+
)
5+
6+
./php/run-unit-tests.ps1 -RepoName $RepoName
7+
8+
exit $LASTEXITCODE

ci/setup-environment.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
param (
2+
[Parameter(Mandatory=$true)]
3+
[string]$LanguageVersion
4+
)
5+
6+
./php/setup-environment.ps1 -LanguageVersion $LanguageVersion
7+
8+
exit $LASTEXITCODE

ci/shared-build-and-test-stage.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

ci/shared-variables.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

ci/submodule-trigger.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

ci/tag-repository.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)