Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/sc-21893/master-fix-bash-compatibil…
Browse files Browse the repository at this point in the history
…ity-issue
  • Loading branch information
tvaleriy authored Dec 4, 2024
2 parents 94a9b08 + 4758074 commit f457b0f
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 85 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Trivy Security Scan
on:
push:
branches:
- '*' # Triggers on pushes to all branches
- master
pull_request:

jobs:
trivy-secrets-scan:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Trufflehog Security Scan
on:
push:
branches:
- '*' # Triggers on pushes to all branches
- master
pull_request:

jobs:
trufflehog-vulnerability-detection:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions bin/command/install/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require docker

import environment/docker.sh
import environment/docker-compose.sh
import environment/mutagen-version-check.sh

Registry::addCommand "boot" "Command::bootstrap"
Registry::addCommand "bootstrap" "Command::bootstrap"
Expand Down
22 changes: 22 additions & 0 deletions bin/environment/mutagen-version-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

function Environment::checkMutagenVersion() {
if [[ "${_PLATFORM}" == "macos" ]]; then
local mutagenInstalledVersion="$(Mutagen::getInstalledVersion)"

if [[ "$mutagenInstalledVersion" == 0.18.* || "$mutagenInstalledVersion" > "0.18" ]]; then
Console::error "Error: Mutagen version 0.18.* is not supported yet. Please, run the command to install the latest supported version.
brew unlink mutagen && brew unlink mutagen-compose && brew install mutagen-io/mutagen/[email protected] mutagen-io/mutagen/[email protected]"
exit 1
fi
fi
}

function Mutagen::getInstalledVersion() {
echo $(String::trimWhitespaces "$(
command -v mutagen >/dev/null 2>&1
test $? -eq 0 && mutagen version
)")
}

Registry::addChecker "Environment::checkMutagenVersion"
18 changes: 10 additions & 8 deletions bin/sdk/images/baked/ecr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ function Images::push() {
for application in "${SPRYKER_APPLICATIONS[@]}"; do
local application="$(echo "$application" | tr '[:upper:]' '[:lower:]')"
echo "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-${application}:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-${application}:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-${application}:latest"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-${application}:${tag}" &
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-${application}:latest" &
done
echo "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-frontend:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-frontend:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-frontend:latest"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-frontend:${tag}" &
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-frontend:latest" &
echo "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-jenkins:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-jenkins:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-jenkins:latest"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-jenkins:${tag}" &
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-jenkins:latest" &
echo "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-pipeline:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-pipeline:${tag}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-pipeline:latest"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-pipeline:${tag}" &
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${SPRYKER_PROJECT_NAME}-pipeline:latest" &

wait
}
12 changes: 11 additions & 1 deletion docs/09-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ $config[SchedulerJenkinsConstants::JENKINS_CONFIGURATION] = [
```
**when**
Assets install error
Assets install error
```bash
line 1: run-s: not found
```
Expand All @@ -400,3 +400,13 @@ line 1: run-s: not found
1. ensure you are using latest docker-sdk and spryker/php image.
2. run `docker/sdk pull`
3. run `docker/sdk boot {{your deploy file}} && docker/sdk up --build`
**when**
Installation error with Mutagen v0.18.*
```bash
unable to bring up Mutagen Compose sidecar service: Error response from daemon: network is ambiguous (5 matches found based on ID prefix)
```
**then**
brew unlink mutagen && brew unlink mutagen-compose && brew install mutagen-io/mutagen/[email protected] mutagen-io/mutagen/[email protected]
2 changes: 1 addition & 1 deletion generator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"require": {
"symfony/yaml": "^4.3",
"twig/twig": "^2.11",
"twig/twig": "^3.11",
"spatie/url": "^1.3",
"symfony/console": "^5.3",
"illuminate/collections": "^8.70",
Expand Down
Loading

0 comments on commit f457b0f

Please sign in to comment.