diff --git a/.github/workflows/push_pr_main.yaml b/.github/workflows/push_pr_main.yaml new file mode 100644 index 0000000..27571fc --- /dev/null +++ b/.github/workflows/push_pr_main.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 380c06d..1454c64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,7 @@ on: push: tags: - - '*' + - "*" jobs: create-shasums: runs-on: ubuntu-latest @@ -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 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..86c1134 --- /dev/null +++ b/RELEASE_NOTES.md @@ -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. diff --git a/spec/docker_runtime_no_envs/runtime_no_envs_spec.rb b/spec/docker_runtime_no_envs/runtime_no_envs_spec.rb index dbedcef..6ef4223 100644 --- a/spec/docker_runtime_no_envs/runtime_no_envs_spec.rb +++ b/spec/docker_runtime_no_envs/runtime_no_envs_spec.rb @@ -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 ) @@ -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 @@ -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 diff --git a/spec/docker_runtime_with_passbolt_php/docker_runtime_with_passbolt_php_spec.rb b/spec/docker_runtime_with_passbolt_php/docker_runtime_with_passbolt_php_spec.rb index 878b242..467865f 100644 --- a/spec/docker_runtime_with_passbolt_php/docker_runtime_with_passbolt_php_spec.rb +++ b/spec/docker_runtime_with_passbolt_php/docker_runtime_with_passbolt_php_spec.rb @@ -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