Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

185500801 testing docker build changes #284

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build-image-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ jobs:
files: "./${{ inputs.image }}/${{ inputs.image }}_spec.rb"

- name: Build for acceptance test
if: steps.check_for_tests.outputs.files_exist == 'true'
uses: docker/build-push-action@v3.2.0
if: steps.check_for_tests.outputs.files_exists == 'true'
uses: docker/build-push-action@v4
with:
context: ./${{ inputs.image }}
file: ./${{ inputs.image }}/${{inputs.dockerfile}}
Expand All @@ -115,21 +115,21 @@ jobs:
labels: ${{ steps.meta-ghcr.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ inputs.platforms }}
platforms: "linux/amd64"

- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
if: steps.check_for_tests.outputs.files_exist == 'true'
if: steps.check_for_tests.outputs.files_exists == 'true'
- name: Acceptance Tests
env:
DOCKER_IMAGE: "${{ env.TEST_TAG }}"
run: bundle exec rspec ./${{ inputs.image }}/${{ inputs.image }}_spec.rb
if: steps.check_for_tests.outputs.files_exist == 'true'
if: steps.check_for_tests.outputs.files_exists == 'true'

- name: Build and push to ghcr
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v4
with:
context: ./${{ inputs.image }}
platforms: ${{ inputs.platforms }}
Expand All @@ -147,7 +147,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push to docker hub
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v4.1.1
with:
context: ./${{ inputs.image }}
platforms: ${{ inputs.platforms }}
Expand Down
2 changes: 1 addition & 1 deletion cf-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ghcr.io/alphagov/paas/ruby-base:main

ENV PACKAGES "unzip curl openssl ca-certificates git libc6-compat bash jq gettext make"
ENV CF_CLI_VERSION "8.6.0"
ENV CF_CLI_VERSION "8.7.1"
ENV SPRUCE_VERSION "1.30.2"

RUN apk add --no-cache $PACKAGES
Expand Down
6 changes: 3 additions & 3 deletions cf-cli/cf-cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
require 'docker'
require 'serverspec'

CF_CLI_VERSION="8.6.0"
CF_CLI_VERSION="8.7.1"
SPRUCE_BIN = "/usr/local/bin/spruce"
SPRUCE_VERSION = "1.27.0"
SPRUCE_VERSION = "1.30.2"

describe "cf-cli image" do
before(:all) {
Expand Down Expand Up @@ -72,7 +72,7 @@

it "has the spruce version #{SPRUCE_VERSION}" do
spruce_version = command("spruce --version").stdout.strip
expect(spruce_version).to match(/spruce - Version #{SPRUCE_VERSION}( \(master\))?/)
expect(spruce_version).to match(/spruce - Version v#{SPRUCE_VERSION}/)
end

it "has `bash` available" do
Expand Down
4 changes: 2 additions & 2 deletions spruce/spruce_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'serverspec'

SPRUCE_BIN = "/usr/local/bin/spruce"
SPRUCE_VERSION = "1.27.0"
SPRUCE_VERSION = "1.30.2"
ALPINE_VERSION = "3.16"

describe "spruce image" do
Expand All @@ -28,7 +28,7 @@ def os_version
end

it "has the spruce version #{SPRUCE_VERSION}" do
expect(spruce_version).to match(/spruce - Version #{SPRUCE_VERSION}( \(master\))?/)
expect(spruce_version).to match(/spruce - Version v#{SPRUCE_VERSION}/)
end

def spruce_version
Expand Down