-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge pull request #246 from dvsa/add-selfserve-to-monorepo
chore: migrate selfserve to monorepo
- Loading branch information
Showing
1,079 changed files
with
93,930 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.php] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
versioning-strategy: "increase-if-necessary" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
composer-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "composer" | ||
directory: "/vendor-bin/phpcs" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
composer-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "composer" | ||
directory: "/vendor-bin/phpstan" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
composer-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "composer" | ||
directory: "/vendor-bin/psalm" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
composer-dependencies: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
github-action-dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-please: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
outputs: | ||
tag_name: ${{ steps.release.outputs.tag_name }} | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
sha: ${{ steps.release.outputs.sha }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: php | ||
package-name: olcs-selfserve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
|
||
jobs: | ||
security: | ||
uses: dvsa/.github/.github/workflows/php-security.yml@main | ||
secrets: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
||
static-analysis: | ||
uses: dvsa/.github/.github/workflows/php-static.yml@main | ||
with: | ||
php-version: '8.2' | ||
|
||
tests: | ||
uses: dvsa/.github/.github/workflows/php-tests.yml@main | ||
with: | ||
php-versions: '["8.2"]' | ||
fail-fast: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
* | ||
!.gitignore | ||
# Trigger CD - 08-08-2024 13:55. | ||
nbproject | ||
._* | ||
.~lock.* | ||
.buildpath | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings | ||
vendor | ||
test/coverage-report | ||
.sublime-project | ||
.sass-cache/ | ||
public/static | ||
*.sw? | ||
node_modules | ||
.vscode/ | ||
test/coverage/ | ||
.scannerwork/ | ||
config/development.config.php | ||
/vendor-bin/*/composer.lock | ||
.phpunit.result.cache | ||
|
||
# Non-dist files for the static analysis. | ||
# This allows developers to set a different (more strict) static analysis locally. | ||
phpcs.xml | ||
phpstan.neon | ||
phpunit.xml | ||
psalm.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#OLCS SELFSERVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
<project name="OLCS Selfserve/SSWEB" default="build"> | ||
|
||
<property name="version-file" value="config/version"/> | ||
<property name="tar-file" value="olcs-selfserve"/> | ||
|
||
<target name="init-environment"> | ||
<exec executable="hostname" outputproperty="computer.hostname"/> | ||
<condition property="environment.isSkyScape"> | ||
<contains string="${computer.hostname}" substring=".mtpdvsa" casesensitive="false"/> | ||
</condition> | ||
<condition property="environment.isAws"> | ||
<contains string="${computer.hostname}" substring=".aws" casesensitive="false"/> | ||
</condition> | ||
<condition property="environment.isOther"> | ||
<and> | ||
<not> | ||
<contains string="${computer.hostname}" substring=".mtpdvsa" casesensitive="false"/> | ||
</not> | ||
<not> | ||
<contains string="${computer.hostname}" substring=".aws" casesensitive="false"/> | ||
</not> | ||
</and> | ||
</condition> | ||
</target> | ||
|
||
<target name="init-composer-aws" if="environment.isAws"> | ||
<exec executable="s3cmd" dir="." failonerror="true"> | ||
<arg line="get s3://rpm-repo001/composer.phar --skip-existing"/> | ||
</exec> | ||
|
||
<exec executable="sed" dir="." failonerror="true"> | ||
<arg line="-i -e 's/satis.inf.mgt.mtpdvsa/devrepo.shd.ci.nonprod.dvsa.aws/g' composer.json"/> | ||
</exec> | ||
<exec executable="sed" dir="."> | ||
<arg line="-i -e 's/satis.inf.mgt.mtpdvsa/devrepo.shd.ci.nonprod.dvsa.aws/g' composer.lock"/> | ||
</exec> | ||
|
||
<exec executable="sed" dir="." failonerror="true"> | ||
<arg line="-i -e 's/gitlab.inf.mgt.mtpdvsa/repo.shd.ci.nonprod.dvsa.aws/g' composer.json"/> | ||
</exec> | ||
<exec executable="sed" dir="."> | ||
<arg line="-i -e 's/gitlab.inf.mgt.mtpdvsa/repo.shd.ci.nonprod.dvsa.aws/g' composer.lock"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="init-composer-skyscape" if="environment.isSkyScape"> | ||
<get src="http://satis.inf.mgt.mtpdvsa/composer.phar" dest="composer.phar"/> | ||
</target> | ||
|
||
<target name="init-composer-other" if="environment.isOther"> | ||
<get src="http://getcomposer.org/composer.phar" dest="composer.phar"/> | ||
</target> | ||
|
||
<target name="init-composer" depends="init-environment, init-composer-aws, init-composer-other, init-composer-skyscape"> | ||
</target> | ||
|
||
<target name="lint" description="Perform syntax check of sourcecode files"> | ||
<apply executable="php" failonerror="true"> | ||
<arg value="-l"/> | ||
<fileset dir="."> | ||
<include name="**/*.php"/> | ||
<exclude name="vendor/**"/> | ||
</fileset> | ||
</apply> | ||
</target> | ||
|
||
<target name="clean" description="Clean (remove) temporary files"> | ||
<delete file="data/autoload/classmap.php"/> | ||
<delete> | ||
<fileset dir="data/cache" includes="**"/> | ||
</delete> | ||
</target> | ||
|
||
<target name="unittest" description="Run unit tests"> | ||
<exec executable="vendor/bin/phpunit" dir="." failonerror="true"> | ||
<arg line="-ctest/phpunit.xml"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="composer-update" depends="init-composer" description="Update composer dependencies"> | ||
<exec executable="php" failonerror="true"> | ||
<arg value="composer.phar"/> | ||
<arg value="update"/> | ||
<arg value="--optimize-autoloader"/> | ||
<arg value="--no-interaction"/> | ||
<arg value="--no-progress"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="composer-update-olcs" depends="init-composer" description="Update composer OLCS dependencies"> | ||
<exec executable="php" failonerror="true"> | ||
<arg value="composer.phar"/> | ||
<arg value="update"/> | ||
<arg value="--optimize-autoloader"/> | ||
<arg value="--no-interaction"/> | ||
<arg value="--no-progress"/> | ||
<arg value="olcs/*"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="composer-install" depends="init-composer" description="Install composer dependencies"> | ||
<exec executable="php" failonerror="true"> | ||
<arg value="composer.phar"/> | ||
<arg value="install"/> | ||
<arg value="--optimize-autoloader"/> | ||
<arg value="--no-interaction"/> | ||
<arg value="--no-progress"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="composer-install-nodev" depends="init-composer" description="Install composer dependencies exclude dev dependencies"> | ||
<exec executable="php" failonerror="true"> | ||
<arg value="composer.phar"/> | ||
<arg value="install"/> | ||
<arg value="--optimize-autoloader"/> | ||
<arg value="--no-dev"/> | ||
<arg value="--no-interaction"/> | ||
<arg value="--no-progress"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="build" description="Build for production" depends="clean, lint, composer-install, unittest, composer-install-nodev, write-info" /> | ||
|
||
<target name="tar" description="Create tar.gz file" depends="build"> | ||
<exec executable="tar" failonerror="true"> | ||
<arg value="-czf${tar-file}.tar.gz"/> | ||
<arg value="--exclude=config/autoload/local.php"/> | ||
<arg value="--exclude=config/autoload/local.php.dist"/> | ||
<arg line="composer.lock init_autoloader.php config module public data/autoload data/cache vendor"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="write-info" description="Write build info to a file" if="version-file"> | ||
<exec executable="git" output="${version-file}" failonerror="true"> | ||
<arg line="describe --all"/> | ||
</exec> | ||
<exec executable="date" output="${version-file}" append="true" failonerror="true"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Proxy to `vendor/bin/composer-update-syms` | ||
# This script kept for to keep people happy who have got used to using it. | ||
|
||
if [ -f vendor/bin/composer-update-syms ]; then | ||
vendor/bin/composer-update-syms | ||
else | ||
echo "\"olcs/olcs-devtools\" composer dependency needs to be installed. You probably need to run 'composer update' first" | ||
fi |
Oops, something went wrong.