Skip to content

Commit fb4f97b

Browse files
committed
Merge branch 'release/v3.8.0'
2 parents cf7aebf + 2414ede commit fb4f97b

31 files changed

+769
-514
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ variables:
66
DOCKER_TLS_CERTDIR: ""
77

88
stages:
9-
- scanning
109
- build
1110
- test-vulnerabilities
1211
- test
@@ -15,8 +14,9 @@ stages:
1514

1615
include:
1716
- local: '/.gitlab-ci/Jobs/build_image.yml'
18-
- local: '/.gitlab-ci/Jobs/container_security_scan.yml'
17+
- local: '/.gitlab-ci/Jobs/rules.yml'
1918
- local: '/.gitlab-ci/Jobs/test_vulnerabilities.yaml'
2019
- local: '/.gitlab-ci/Jobs/test_images.yaml'
2120
- local: '/.gitlab-ci/Jobs/publish.yaml'
2221
- local: '/.gitlab-ci/Jobs/docker-compose-file-upload.yml'
22+
- local: '/.gitlab-ci/Jobs/entrypoint_test.yml'

.gitlab-ci/Jobs/build_image.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.build:
2+
extends: .rules
23
stage: build
34
image:
45
name: gcr.io/kaniko-project/executor:debug
@@ -22,40 +23,40 @@
2223
--destination $CI_REGISTRY_IMAGE:${PASSBOLT_FLAVOUR:-local}-${DOCKER_TAG}-$(date +%s) \
2324
--destination $CI_REGISTRY_IMAGE:${PASSBOLT_FLAVOUR:-local}-${DOCKER_TAG}-latest
2425
25-
.testing-build:
26+
.stable-build:
2627
extends: .build
27-
rules:
28-
- if: '($CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_MESSAGE =~ /test-image/ ) && $PASSBOLT_FLAVOUR =~ /ce|pro/'
29-
when: on_success
28+
variables:
29+
COMPONENT: "stable"
30+
PASSBOLT_FLAVOUR: "ce"
31+
OPPOSITE_FLAVOUR: "pro"
3032

31-
.stable-build:
33+
.stable-build-pro:
3234
extends: .build
3335
variables:
3436
COMPONENT: "stable"
35-
rules:
36-
- if: '$CI_COMMIT_BRANCH == "master" && $PASSBOLT_FLAVOUR =~ /ce|pro/'
37-
when: on_success
37+
PASSBOLT_FLAVOUR: "pro"
38+
OPPOSITE_FLAVOUR: "ce"
3839

39-
build-testing-docker:
40-
extends: .testing-build
40+
build-stable-docker:
41+
extends: .stable-build
4142
variables:
4243
DOCKERFILE_PATH: "debian/Dockerfile"
4344
DOCKER_TAG: "root"
4445

45-
build-testing-rootless:
46-
extends: .testing-build
46+
build-stable-rootless:
47+
extends: .stable-build
4748
variables:
4849
DOCKERFILE_PATH: "debian/Dockerfile.rootless"
4950
DOCKER_TAG: "rootless"
5051

51-
build-stable-docker:
52-
extends: .stable-build
52+
build-pro-stable-docker:
53+
extends: .stable-build-pro
5354
variables:
5455
DOCKERFILE_PATH: "debian/Dockerfile"
5556
DOCKER_TAG: "root"
5657

57-
build-stable-rootless:
58-
extends: .stable-build
58+
build-pro-stable-rootless:
59+
extends: .stable-build-pro
5960
variables:
6061
DOCKERFILE_PATH: "debian/Dockerfile.rootless"
6162
DOCKER_TAG: "rootless"

.gitlab-ci/Jobs/container_security_scan.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
entrypoint-tests:
2+
extends: .rules
3+
stage: test
4+
image: registry.gitlab.com/passbolt/passbolt-ci-docker-images/debian-bullseye-11-slim:latest
5+
before_script:
6+
- apt update && apt install curl git -y
7+
- curl -fsSL https://git.io/shellspec | sh -s -- --yes
8+
script:
9+
- /root/.local/bin/shellspec -s /bin/bash -f d

.gitlab-ci/Jobs/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
IMAGE_NAME: "passbolt/passbolt"
3636
PASSBOLT_IMAGE_FLAVOUR: "ce"
3737
rules:
38-
- if: '$PASSBOLT_VERSION && $CI_COMMIT_BRANCH == "master" && $PASSBOLT_FLAVOUR == "ce"'
38+
- if: '$PASSBOLT_VERSION && $CI_COMMIT_BRANCH == "master" && $PASSBOLT_PUBLISH == "ce"'
3939
when: on_success
4040

4141
publish-ce:
@@ -62,7 +62,7 @@ publish-pro:
6262
- *docker-authentication
6363
- *publish-command
6464
rules:
65-
- if: '$PASSBOLT_VERSION && $CI_COMMIT_BRANCH == "master" && $PASSBOLT_FLAVOUR == "pro"'
65+
- if: '$PASSBOLT_VERSION && $CI_COMMIT_BRANCH == "master" && $PASSBOLT_PUBLISH == "pro"'
6666
when: on_success
6767

6868
publish-pro-non-root:

.gitlab-ci/Jobs/rules.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.rules:
2+
rules:
3+
- if: '$CI_COMMIT_BRANCH && $PASSBOLT_PUBLISH != "OPPOSITE_FLAVOUR"'
4+
when: on_success

.gitlab-ci/Jobs/test_images.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
services:
2-
- docker:19.03.0-dind
2+
- name: registry.gitlab.com/passbolt/passbolt-ci-docker-images/dind:latest
3+
alias: docker
4+
command: ["--tls=false"]
35

46
.test-images:
7+
extends: .rules
58
stage: test
69
image:
710
name: registry.gitlab.com/passbolt/passbolt-ci-docker-images/ruby:latest
@@ -10,19 +13,17 @@ services:
1013
- rake spec:$TEST_NAME
1114
variables:
1215
PASSBOLT_COMPONENT: stable
13-
rules:
14-
- if: '($CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_MESSAGE =~ /test-image/ || $CI_COMMIT_BRANCH == "master" ) && $PASSBOLT_FLAVOUR == "ce"'
15-
when: on_success
16+
PASSBOLT_FLAVOUR: ce
17+
OPPOSITE_FLAVOUR: pro
1618

1719
.test-pro-images:
1820
extends: .test-images
1921
before_script:
2022
- cat $SUBSCRIPTION_KEY > subscription_key.txt
2123
variables:
2224
PASSBOLT_COMPONENT: stable
23-
rules:
24-
- if: '($CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_MESSAGE =~ /test-image/ || $CI_COMMIT_BRANCH == "master" ) && $PASSBOLT_FLAVOUR == "pro"'
25-
when: on_success
25+
PASSBOLT_FLAVOUR: pro
26+
OPPOSITE_FLAVOUR: ce
2627

2728
ce-docker-image:
2829
extends: .test-images
Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.test-vulnerabilities:
2+
extends: .rules
23
stage: test-vulnerabilities
34
image:
45
name: registry.gitlab.com/passbolt/passbolt-ci-docker-images/aquasec:latest
@@ -8,13 +9,29 @@
89
DOCKER_TAG: root
910
script:
1011
- trivy image --ignore-unfixed $CI_REGISTRY_IMAGE:${PASSBOLT_FLAVOUR}-${DOCKER_TAG}-latest
11-
rules:
12-
- if: '($CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_MESSAGE =~ /test-image/ ) && $PASSBOLT_FLAVOUR =~ /ce|pro/'
13-
when: on_success
1412

15-
docker:
13+
docker-ce:
1614
extends: .test-vulnerabilities
17-
docker-non-root:
15+
variables:
16+
PASSBOLT_FLAVOUR: "ce"
17+
OPPOSITE_FLAVOUR: "pro"
18+
19+
docker-ce-rootless:
20+
extends: .test-vulnerabilities
21+
variables:
22+
PASSBOLT_FLAVOUR: "ce"
23+
DOCKER_TAG: "rootless"
24+
OPPOSITE_FLAVOUR: "pro"
25+
26+
docker-pro:
27+
extends: .test-vulnerabilities
28+
variables:
29+
PASSBOLT_FLAVOUR: "pro"
30+
OPPOSITE_FLAVOUR: "ce"
31+
32+
docker-pro-rootless:
1833
extends: .test-vulnerabilities
1934
variables:
35+
PASSBOLT_FLAVOUR: "pro"
2036
DOCKER_TAG: "rootless"
37+
OPPOSITE_FLAVOUR: "ce"

.shellspec

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--require spec_helper
2+
3+
## Default kcov (coverage) options
4+
# --kcov-options "--include-path=. --path-strip-level=1"
5+
# --kcov-options "--include-pattern=.sh"
6+
# --kcov-options "--exclude-pattern=/.shellspec,/spec/,/coverage/,/report/"
7+
8+
## Example: Include script "myprog" with no extension
9+
# --kcov-options "--include-pattern=.sh,myprog"
10+
11+
## Example: Only specified files/directories
12+
# --kcov-options "--include-pattern=myprog,/lib/"
13+
--execdir @basedir/debian/scripts

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v3.7.5...HEAD)
5+
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v3.8.0...HEAD)
6+
7+
## [3.8.0](https://github.com/passbolt/passbolt_docker/compare/v3.7.5...v3.8.0) - 2023-01-13
8+
9+
### Added
10+
11+
- Support for docker secrets
12+
- Shellspec for entrypoint testing
13+
14+
### Changed
15+
16+
- Entrypoint refactor in separated libraries for increased testability
617

718
## [3.7.5](https://github.com/passbolt/passbolt_docker/compare/v3.7.4...v3.7.5) - 2022-12-01
819

0 commit comments

Comments
 (0)