Skip to content

Commit

Permalink
Merge branch 'release/2.1.0' into main-6-5
Browse files Browse the repository at this point in the history
  • Loading branch information
hipaybot committed Jan 17, 2024
2 parents f7d21eb + 950d12b commit 2c23818
Show file tree
Hide file tree
Showing 53 changed files with 1,910 additions and 88 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@

bin/
!bin/docker/images/shopware/entrypoint.sh
!bin/docker/conf/nginx/proxy_helm.conf
tests/
web/
reports/
log/
node_modules/
/yarn.lock
package-ready-for-shopware/
.github/
.gitlab-ci.yml
.gitignore
.prettierrc
.dockerignore
sonar-project.properties
docker-compose.yaml
shopware.sh
17 changes: 15 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ build:
when: manual
extends: .login_to_registry
script:
- sed -i "s|RELEASE_NAME|$RELEASE_NAME|" ./bin/docker/conf/nginx/proxy_helm.conf
- sed -i "s|URL_DOMAIN|${DOCKER_STACK}-${DOCKER_SERVICE}-${CI_COMMIT_REF_SLUG}.${URL_CD}|" ./bin/docker/conf/nginx/proxy_helm.conf
- /kaniko/executor
--cache=true
--context "dir://${CI_PROJECT_DIR}"
--dockerfile "./bin/docker/images/proxy/Dockerfile_helm"
--destination "${REGISTRY_CD}/${DOCKER_STACK}-${DOCKER_SERVICE}-proxy:${CI_COMMIT_REF_SLUG}"
- /kaniko/executor
--cache=true
--context "dir://${CI_PROJECT_DIR}"
Expand All @@ -343,8 +350,7 @@ build:
deploy2recette:
stage: deploy
image: $REGISTRY_CI/gitlab-ci-base:deployment
needs:
- build
needs: []
rules:
- if: $ONLY_DEPLOY
when: on_success
Expand All @@ -358,6 +364,8 @@ deploy2recette:
- >
helm install $RELEASE_NAME ./bin/docker/kubernetes/helm/
--namespace default
--set proxy_image="${REGISTRY_CD}/${DOCKER_STACK}-${DOCKER_SERVICE}-proxy"
--set proxy_tag="${CI_COMMIT_REF_SLUG}"
--set shopware_image="${REGISTRY_CD}/${DOCKER_STACK}-${DOCKER_SERVICE}-web"
--set shopware_tag="${CI_COMMIT_REF_SLUG}"
--set shopware_url="${DOCKER_STACK}-${DOCKER_SERVICE}-${CI_COMMIT_REF_SLUG}.${URL_CD}"
Expand All @@ -366,6 +374,11 @@ deploy2recette:
--set public_login_stage="$HIPAY_TOKENJS_USERNAME_RE7"
--set public_password_stage="$HIPAY_TOKENJS_PUBLICKEY_RE7"
--set passphrase_stage="$HIPAY_SECRET_PASSPHRASE_RE7"
--set private_applepay_login_stage="$HIPAY_APPLEPAY_USERNAME_RE7"
--set private_applepay_password_stage="$HIPAY_APPLEPAY_PASSWORD_RE7"
--set public_applepay_login_stage="$HIPAY_APPLEPAY_TOKENJS_USERNAME_RE7"
--set public_applepay_password_stage="$HIPAY_APPLEPAY_TOKENJS_PUBLICKEY_RE7"
--set applepay_passphrase_stage="$HIPAY_APPLEPAY_SECRET_PASSPHRASE_RE7"
--set branch="$CI_COMMIT_REF_NAME"
allow_failure: true
environment:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## Version 2.1.0

- **Add** : Added new payment means
- ApplePay
- Alma 3x
- Alma 4x

## Version 2.0.3

- **Fixed** : Fixed Shopware migration when reinstalling HiPay module
Expand Down
20 changes: 18 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ If you want to contribute on our module, you have to use a branch based on the c
| 6.4 | [develop-6-4](https://github.com/hipay/hipay-enterprise-shopware-6/tree/develop-6-4) | [main-6-4](https://github.com/hipay/hipay-enterprise-shopware-6/tree/main-6-4) |
| 6.5 | [develop-6-5](https://github.com/hipay/hipay-enterprise-shopware-6/tree/develop-6-5) | [main-6-5](https://github.com/hipay/hipay-enterprise-shopware-6/tree/main-6-5) |

### Setup

You need to add an alias to your `etc/hosts` file :

```bash
127.0.0.1 hipay.shopware.com
```

Make sure you have `APP_URL=https://hipay.shopware.com` param in your .env file.

### Startup container

Go in the project root folder and enter this command:
Expand All @@ -54,9 +64,15 @@ Go in the project root folder and enter this command:

Your container is loading: wait for a few seconds while Docker installs Shopware and the HiPay module.

You can now test the HiPay Enterprise module in a browser with this URL: <http://localhost>
Once the init is complete :

```bash
./shopware.sh l
```

You can now test the HiPay Enterprise module in a browser with this URL: <https://hipay.shopware.com>

To connect to the back office, go to this URL: <http://localhost/admin>
To connect to the back office, go to this URL: <https://hipay.shopware.com/admin>

The login and password are the default: admin / shopware.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ If you encounter an issue while using the modules, before contacting our Support

The **HiPay Enterprise plugin for Shopware 6** is free and available under the **Apache 2.0 License**. Check out the [license file][project-license] for more information.

[doc-home]: https://developer.hipay.com/doc/hipay-enterprise-shopware-6/
[doc-home]: https://developer.hipay.com/cms-modules/shopware-6
[hipay-help]: http://help.hipay.com
[project-issues]: https://github.com/hipay/hipay-enterprise-shopware-6/issues
[project-license]: LICENSE.md
Expand Down
22 changes: 22 additions & 0 deletions bin/docker/conf/development/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ HIPAY_ENVIRONMENT=
# hostedFields or hostedPage
OPERATION_MODE=

# PRODUCTION CREDENTIALS
PRIVATE_LOGIN_PRODUCTION=
PRIVATE_PASSWORD_PRODUCTION=
PUBLIC_LOGIN_PRODUCTION=
Expand All @@ -27,6 +28,16 @@ PASSPHRASE_PRODUCTION=
# sha256 or sha512
HASH_PRODUCTION=

# APPLEPAY PRODUCTION CREDENTIALS
PRIVATE_APPLEPAY_LOGIN_PRODUCTION=
PRIVATE_APPLEPAY_PASSWORD_PRODUCTION=
PUBLIC_APPLEPAY_LOGIN_PRODUCTION=
PUBLIC_APPLEPAY_PASSWORD_PRODUCTION=
APPLEPAY_PASSPHRASE_PRODUCTION=
# sha256 or sha512
HASH_PRODUCTION_APPLEPAY=

# STAGE CREDENTIALS
PRIVATE_LOGIN_STAGE=
PRIVATE_PASSWORD_STAGE=
PUBLIC_LOGIN_STAGE=
Expand All @@ -35,5 +46,16 @@ PASSPHRASE_STAGE=
# sha256 or sha512
HASH_STAGE=

# STAGE APPLEPAY CREDENTIALS
PRIVATE_APPLEPAY_LOGIN_STAGE=
PRIVATE_APPLEPAY_PASSWORD_STAGE=
PUBLIC_APPLEPAY_LOGIN_STAGE=
PUBLIC_APPLEPAY_PASSWORD_STAGE=
APPLEPAY_PASSPHRASE_STAGE=
# sha256 or sha512
HASH_STAGE_APPLEPAY=

# Activating technicals logs, true or false
LOG_DEBUG=

APP_URL=https://hipay.shopware.com
59 changes: 59 additions & 0 deletions bin/docker/conf/nginx/proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
server {
listen 80;
server_name hipay.shopware.com;
return 301 https://$host$uri$is_args$args;
}

server {
listen 443 ssl;
server_name hipay.shopware.com;

ssl_certificate /etc/nginx/ssl/selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/selfsigned.key;

location / {
proxy_pass https://shopware;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
}

server {
listen 8888 ssl;
server_name hipay.shopware.com;

ssl_certificate /etc/nginx/ssl/selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/selfsigned.key;

location /admin {
proxy_pass http://shopware:8888;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
location /static {
proxy_pass http://shopware:8888;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
location /api {
proxy_pass http://shopware;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
location / {
proxy_pass http://shopware:8888;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
}

server {
listen 9998 ssl;
server_name hipay.shopware.com;

ssl_certificate /etc/nginx/ssl/selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/selfsigned.key;

error_page 497 301 =307 https://$host:$server_port$uri$is_args$args;

location / {
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
proxy_pass http://shopware:9998;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
}
24 changes: 24 additions & 0 deletions bin/docker/conf/nginx/proxy_helm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
server {
listen 80;
server_name URL_DOMAIN;
add_header X-header "ok";
return 301 https://$host$uri$is_args$args;
}

server {
listen 443 ssl;
server_name URL_DOMAIN;

ssl_certificate /etc/nginx/ssl/selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/selfsigned.key;

access_log /var/log/hipay_access.log;
error_log /var/log/hipay_error.log;

add_header X-test "ok";

location / {
proxy_pass https://shopware-web-RELEASE_NAME;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
}
5 changes: 5 additions & 0 deletions bin/docker/images/proxy/Dockerfile_helm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM dockware/proxy:latest

COPY bin/docker/conf/nginx/proxy_helm.conf /etc/nginx/conf.d/default.conf

CMD [ "/entrypoint.sh" ]
12 changes: 12 additions & 0 deletions bin/docker/images/shopware/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ RUN echo '\
PUBLIC_PASSWORD_STAGE=$PUBLIC_PASSWORD_STAGE \n\
PASSPHRASE_STAGE=$PASSPHRASE_STAGE \n\
HASH_STAGE=$HASH_STAGE \n\
PRIVATE_APPLEPAY_LOGIN_PRODUCTION=$PRIVATE_APPLEPAY_LOGIN_PRODUCTION \n\
PRIVATE_APPLEPAY_PASSWORD_PRODUCTION=$PRIVATE_APPLEPAY_PASSWORD_PRODUCTION \n\
PUBLIC_APPLEPAY_LOGIN_PRODUCTION=$PUBLIC_APPLEPAY_LOGIN_PRODUCTION \n\
PUBLIC_APPLEPAY_PASSWORD_PRODUCTION=$PUBLIC_APPLEPAY_PASSWORD_PRODUCTION \n\
APPLEPAY_PASSPHRASE_PRODUCTION=$APPLEPAY_PASSPHRASE_PRODUCTION \n\
HASH_PRODUCTION_APPLEPAY=$HASH_PRODUCTION_APPLEPAY \n\
PRIVATE_APPLEPAY_LOGIN_STAGE=$PRIVATE_APPLEPAY_LOGIN_STAGE \n\
PRIVATE_APPLEPAY_PASSWORD_STAGE=$PRIVATE_APPLEPAY_PASSWORD_STAGE \n\
PUBLIC_APPLEPAY_LOGIN_STAGE=$PUBLIC_APPLEPAY_LOGIN_STAGE \n\
PUBLIC_APPLEPAY_PASSWORD_STAGE=$PUBLIC_APPLEPAY_PASSWORD_STAGE \n\
APPLEPAY_PASSPHRASE_STAGE=$APPLEPAY_PASSPHRASE_STAGE \n\
HASH_STAGE_APPLEPAY=$HASH_STAGE_APPLEPAY \n\
LOG_DEBUG=$LOG_DEBUG \
' >>.env

Expand Down
1 change: 1 addition & 0 deletions bin/docker/images/shopware/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sudo chmod -R g+w /var/www/html/var

if [ ! -z $APP_URL ]; then
echo "SETTING ACTUAL URL"
sed -i "s|APP_URL=$BASE_URL|APP_URL=$APP_URL|" .env
sudo mysql -u root --password=root -D shopware -e "update sales_channel_domain set url='$APP_URL' where url='$BASE_URL';"
bin/console app:url-change:resolve reinstall-apps
bin/console cache:clear --quiet
Expand Down
3 changes: 3 additions & 0 deletions bin/docker/kubernetes/helm/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
.idea/
*.tmproj
.vscode/

# Ignore specifically
*.yaml.dist
6 changes: 6 additions & 0 deletions bin/docker/kubernetes/helm/templates/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ data:
PUBLIC_PASSWORD_STAGE: '{{ .Values.public_password_stage }}'
PASSPHRASE_STAGE: '{{ .Values.passphrase_stage }}'
HASH_STAGE: sha256
PRIVATE_APPLEPAY_LOGIN_STAGE: '{{ .Values.private_applepay_login_stage }}'
PRIVATE_APPLEPAY_PASSWORD_STAGE: '{{ .Values.private_applepay_password_stage }}'
PUBLIC_APPLEPAY_LOGIN_STAGE: '{{ .Values.public_applepay_login_stage }}'
PUBLIC_APPLEPAY_PASSWORD_STAGE: '{{ .Values.public_applepay_password_stage }}'
APPLEPAY_PASSPHRASE_STAGE: '{{ .Values.applepay_passphrase_stage }}'
HASH_STAGE_APPLEPAY: sha256
Loading

0 comments on commit 2c23818

Please sign in to comment.