Skip to content

Commit

Permalink
Merge branch 'develop' into release/v3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dlen committed Jan 13, 2023
2 parents c5163c5 + f53541f commit 2414ede
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ include:
- local: '/.gitlab-ci/Jobs/test_images.yaml'
- local: '/.gitlab-ci/Jobs/publish.yaml'
- local: '/.gitlab-ci/Jobs/docker-compose-file-upload.yml'
- local: '/.gitlab-ci/Jobs/entrypoint_test.yml'
6 changes: 2 additions & 4 deletions .gitlab-ci/Jobs/entrypoint_test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
entrypoint-tests:
extends: .rules
stage: test
image: registry.gitlab.com/passbolt/passbolt-ci-docker-images/debian-bullseye-11-slim:latest
before_script:
- apt update && apt install curl git -y
- curl -fsSL https://git.io/shellspec | sh -s -- --yes
script:
- /root/.local/bin/shellspec -c debian/entrypoint -s /bin/bash -f d
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_MESSAGE =~ /test-image/ || $CI_COMMIT_BRANCH == "master"
when: on_success
- /root/.local/bin/shellspec -s /bin/bash -f d
1 change: 1 addition & 0 deletions debian/entrypoint/.shellspec → .shellspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

## Example: Only specified files/directories
# --kcov-options "--include-pattern=myprog,/lib/"
--execdir @basedir/debian/scripts
10 changes: 5 additions & 5 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ RUN apt-get update \
COPY conf/supervisor/cron.conf /etc/supervisor/conf.d/cron.conf
COPY conf/supervisor/nginx.conf /etc/supervisor/conf.d/nginx.conf
COPY conf/supervisor/php.conf /etc/supervisor/conf.d/php.conf
COPY debian/entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
COPY debian/entrypoint/passbolt/entrypoint.sh /passbolt/entrypoint.sh
COPY debian/entrypoint/passbolt/env.sh /passbolt/env.sh
COPY debian/entrypoint/passbolt/deprecated_paths.sh /passbolt/deprecated_paths.sh
COPY debian/entrypoint/passbolt/entropy.sh /passbolt/entropy.sh
COPY scripts/entrypoint/docker-entrypoint.sh /docker-entrypoint.sh
COPY scripts/entrypoint/passbolt/entrypoint.sh /passbolt/entrypoint.sh
COPY scripts/entrypoint/passbolt/env.sh /passbolt/env.sh
COPY scripts/entrypoint/passbolt/deprecated_paths.sh /passbolt/deprecated_paths.sh
COPY scripts/entrypoint/passbolt/entropy.sh /passbolt/entropy.sh
COPY scripts/wait-for.sh /usr/bin/wait-for.sh

EXPOSE 80 443
Expand Down
10 changes: 5 additions & 5 deletions debian/Dockerfile.rootless
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ RUN sed -i 's,listen 80;,listen 8080;,' /etc/nginx/sites-enabled/nginx-passbolt.

COPY conf/supervisor/nginx.conf /etc/supervisor/conf.d/nginx.conf
COPY conf/supervisor/php.conf /etc/supervisor/conf.d/php.conf
COPY debian/entrypoint/docker-entrypoint.rootless.sh /docker-entrypoint.sh
COPY debian/entrypoint/passbolt/entrypoint-rootless.sh /passbolt/entrypoint-rootless.sh
COPY debian/entrypoint/passbolt/env.sh /passbolt/env.sh
COPY debian/entrypoint/passbolt/deprecated_paths.sh /passbolt/deprecated_paths.sh
COPY debian/entrypoint/passbolt/entropy.sh /passbolt/entropy.sh
COPY scripts/entrypoint/docker-entrypoint.rootless.sh /docker-entrypoint.sh
COPY scripts/entrypoint/passbolt/entrypoint-rootless.sh /passbolt/entrypoint-rootless.sh
COPY scripts/entrypoint/passbolt/env.sh /passbolt/env.sh
COPY scripts/entrypoint/passbolt/deprecated_paths.sh /passbolt/deprecated_paths.sh
COPY scripts/entrypoint/passbolt/entropy.sh /passbolt/entropy.sh
COPY scripts/wait-for.sh /usr/bin/wait-for.sh

EXPOSE 8080 4433
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Describe "secret_file_to_path function"
export PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE="/tmp/public.key"
}
Before "environment"
Include "./lib/entrypoint.sh"
Include "./entrypoint/passbolt/env.sh"
It "should create the symlink to the secret file"

When call secret_file_to_path 'PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE' '/etc/passbolt/gpg/serverkey.asc'
Expand All @@ -24,7 +24,7 @@ Describe "secret_file_to_path function"
export PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE="NOT_A_FILE"
}
Before "environment"
Include "./lib/entrypoint.sh"
Include "./entrypoint/passbolt/env.sh"
It "should NOT create the symlink to the secret file"
When call secret_file_to_path 'PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE' '/etc/passbolt/gpg/serverkey.asc'
The status should be success
Expand All @@ -48,7 +48,7 @@ EOF
}
Before "environment"
After "cleanup"
Include "./lib/entrypoint.sh"
Include "./entrypoint/passbolt/env.sh"
It "should return an error because none of the variables are empty"
When call env_from_file 'DATASOURCES_DEFAULT_USERNAME'
The status should be failure
Expand All @@ -65,7 +65,7 @@ EOF
}

Before "environment"
Include "./lib/entrypoint.sh"
Include "./entrypoint/passbolt/env.sh"
After "cleanup"
It "should set the right value on the DATASOURCES_DEFAULT_PASSWORD variable using the DATASOURCES_DEFAULT_PASSWORD_FILE variable"
function check() {
Expand All @@ -83,7 +83,7 @@ EOF
export DATASOURCES_DEFAULT_PASSWORD="password"
}
Before "environment"
Include "./lib/entrypoint.sh"
Include "./entrypoint/passbolt/env.sh"
It "should not change the DATASOURCES_DEFAULT_PASSWORD if it is set"
function check() {
env_from_file 'DATASOURCES_DEFAULT_PASSWORD'
Expand All @@ -95,4 +95,5 @@ EOF
When call check
The status should be success
End

End
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Describe "secret_file_to_path function from rootless lib"
export PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE="/tmp/public.key"
}
Before "environment"
Include "./lib/entrypoint-rootless.sh"
Include "./entrypoint/passbolt/env.sh"
It "should create the symlink to the secret file"

When call secret_file_to_path 'PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE' '/etc/passbolt/gpg/serverkey.asc'
Expand All @@ -24,7 +24,7 @@ Describe "secret_file_to_path function from rootless lib"
export PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE="NOT_A_FILE"
}
Before "environment"
Include "./lib/entrypoint-rootless.sh"
Include "./entrypoint/passbolt/env.sh"
It "should NOT create the symlink to the secret file"
When call secret_file_to_path 'PASSBOLT_GPG_SERVER_KEY_PUBLIC_FILE' '/etc/passbolt/gpg/serverkey.asc'
The status should be success
Expand All @@ -48,7 +48,7 @@ EOF
}
Before "environment"
After "cleanup"
Include "./lib/entrypoint-rootless.sh"
Include "./entrypoint/passbolt/env.sh"
It "should return an error because none of the variables are empty"
When call env_from_file 'DATASOURCES_DEFAULT_USERNAME'
The status should be failure
Expand All @@ -65,7 +65,7 @@ EOF
}

Before "environment"
Include "./lib/entrypoint-rootless.sh"
Include "./entrypoint/passbolt/env.sh"
After "cleanup"
It "should set the right value on the DATASOURCES_DEFAULT_PASSWORD variable using the DATASOURCES_DEFAULT_PASSWORD_FILE variable"
function check() {
Expand All @@ -83,7 +83,7 @@ EOF
export DATASOURCES_DEFAULT_PASSWORD="password"
}
Before "environment"
Include "./lib/entrypoint-rootless.sh"
Include "./entrypoint/passbolt/env.sh"
It "should not change the DATASOURCES_DEFAULT_PASSWORD if it is set"
function check() {
env_from_file 'DATASOURCES_DEFAULT_PASSWORD'
Expand Down
File renamed without changes.

0 comments on commit 2414ede

Please sign in to comment.