-
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.
Merge branch 'hotfix/fix-mend' into 'main'
fix: update gitlab config to fix mend job, refs #626185 See merge request internal/oauth2-client-php!8
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 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 |
---|---|---|
|
@@ -13,3 +13,66 @@ stages: | |
|
||
variables: | ||
PHP_IMAGE: registry.bookbooncloud.com/docker/php-base:8.1.8 | ||
|
||
.auto_devops: &auto_devops | | ||
# Auto DevOps variables and functions | ||
[[ "$TRACE" ]] && set -x | ||
export CI_APPLICATION_REPOSITORY=$CI_REGISTRY_IMAGE | ||
export CI_APPLICATION_TAG=${CI_COMMIT_TAG:-$CI_COMMIT_REF_SLUG} | ||
|
||
COMPOSER=$(echo `which composer`) | ||
|
||
function install_php_dependencies() { | ||
echo -e "\033[0;32mDownloading composer...\033[0m\n" | ||
mkdir -p $HOME/.composer | ||
php -r "copy('https://getcomposer.org/composer.phar', 'composer');" | ||
chmod +x composer | ||
COMPOSER="$PWD/composer" | ||
$COMPOSER --version | ||
|
||
if [ -n "$COMPOSER_INSTALL_TOKEN" ]; then | ||
echo "Using personal token" | ||
$COMPOSER config gitlab-token.bookbooncloud.com $COMPOSER_INSTALL_TOKEN | ||
else | ||
echo "Using group token" | ||
$COMPOSER config gitlab-token.bookbooncloud.com $DEPLOY_COMPOSER_INTERNAL_USER $DEPLOY_COMPOSER_INTERNAL_TOKEN | ||
fi | ||
|
||
echo -e "\033[0;32mComposer install...\033[0m\n" | ||
$COMPOSER install --no-progress --optimize-autoloader | ||
} | ||
|
||
function dast() { | ||
export CI_ENVIRONMENT_URL=$(cat environment_url.txt) | ||
|
||
mkdir /zap/wrk/ | ||
/zap/zap-baseline.py -J gl-dast-report.json -t "$CI_ENVIRONMENT_URL" || true | ||
cp /zap/wrk/gl-dast-report.json . | ||
} | ||
|
||
function performance() { | ||
export CI_ENVIRONMENT_URL=$(cat environment_url.txt) | ||
|
||
mkdir gitlab-exporter | ||
wget -O gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/10-5/index.js | ||
|
||
mkdir sitespeed-results | ||
|
||
if [ -f .gitlab-urls.txt ] | ||
then | ||
sed -i -e 's@^@'"$CI_ENVIRONMENT_URL"'@' .gitlab-urls.txt | ||
docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results .gitlab-urls.txt | ||
else | ||
docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "$CI_ENVIRONMENT_URL" | ||
fi | ||
|
||
mv sitespeed-results/data/performance.json performance.json | ||
} | ||
|
||
function security_sensio() { | ||
apk add --no-cache curl | ||
curl -H "Accept: text/plain" https://security.symfony.com/check_lock -F [email protected] | ||
} | ||
before_script: | ||
- *auto_devops | ||
|