Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request passbolt/passbolt_docker!214
  • Loading branch information
Tecnobutrul committed Dec 30, 2024
2 parents 28e90bf + 083e418 commit 487b3ce
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/push_pr_main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Push & PR to the main branch

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
lint:
name: Passbolt CE Rootless-${{ matrix.rootless}} ${{ matrix.test_name }}
runs-on: ubuntu-latest
strategy:
matrix:
test_name:
[
"docker_image",
"docker_runtime",
"docker_runtime_no_envs",
"docker_runtime_with_passbolt_php",
]
rootless: [true, false]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.5"
bundler-cache: true
- env:
PASSBOLT_COMPONENT: "stable"
PASSBOLT_FLAVOUR: "ce"
ROOTLESS: ${{ matrix.rootless }}
TEST_NAME: ${{ matrix.test_name }}
run: |
bundle exec rake spec:$TEST_NAME
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- '*'
- "*"
jobs:
create-shasums:
runs-on: ubuntu-latest
Expand All @@ -15,6 +15,8 @@ jobs:
sha512sum docker-compose-pro.yaml > docker-compose-pro-SHA512SUM.txt &&
sha512sum ../dev/docker-compose-dev.yaml > docker-compose-dev-SHA512SUM.txt &&
sha512sum docker-compose-ce-postgresql.yaml > docker-compose-ce-postgresql-SHA512SUM.txt
- uses: ncipollo/release-action@v1
with:
artifacts: "docker-compose/docker-compose-*.yaml, docker-compose/*SHA512SUM.txt"
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Create Release
run: |
gh release create "${GITHUB_REF#refs/*/}" -t "${GITHUB_REF#refs/*/}" --notes-file RELEASE_NOTES.md docker-compose/docker-compose-*.yaml docker-compose/*SHA512SUM.txt
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Announcing the immediate availability of passbolt's docker image 4.1.0.

This is a minor change that fixes a logging issue where 500 errors were not redirected to standard output.
Also, it fixes issues on image testing and added the release notes automation on GitHub.
23 changes: 13 additions & 10 deletions spec/docker_runtime_no_envs/runtime_no_envs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@
'Env' => [
"DATASOURCES_DEFAULT_HOST=#{@mysql.json['NetworkSettings']['IPAddress']}"
],
'Binds' => $binds.append(
"#{FIXTURES_PATH + '/passbolt.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
),
'HostConfig' => {
'Binds' => $binds.append(
"#{FIXTURES_PATH + '/passbolt.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
)
},

'Image' => @image.id
)

Expand All @@ -61,9 +64,7 @@
@container.kill
end

let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
let(:uri) { '/install' }
let(:curl) { "curl -skL -H 'Host: passbolt.local' https://#{passbolt_host}:#{$https_port}/#{uri}" }
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }

describe 'php service' do
it 'is running supervised' do
Expand Down Expand Up @@ -91,9 +92,11 @@
end
end

describe 'passbolt install' do
describe 'passbolt healthcheck' do
let(:uri) { '/healthcheck/status.json' }
let(:curl) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}:#{$https_port}/#{uri}" }
it 'shows correctly' do
expect(command(curl).stdout).to match(/.*Passbolt is not configured yet!.*/)
expect(command(curl).stdout).to eq '200'
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@
'PASSBOLT_HEALTHCHECK_ERROR=true'
],
'Image' => @image.id,
'Binds' => $binds.append(
'HostConfig' => {
'Binds' => $binds.append(
"#{FIXTURES_PATH + '/passbolt-no-fingerprint.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
)
)
},
)

@container.start
Expand Down

0 comments on commit 487b3ce

Please sign in to comment.