Skip to content

Bump the versions as described within issue #50 #289

Bump the versions as described within issue #50

Bump the versions as described within issue #50 #289

Workflow file for this run

name: "Test Nodejs ubi extension with Pack CLI"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths-ignore:
- '*.adoc' # Ignores .adoc files at the root of the repository
- '*.md' # Ignores .md files at the root of the repository
- '**/*.md' # Ignores .md files within subdirectories
jobs:
configure-matrix:
uses: ./.github/workflows/configure.yaml
linux-pack-build:
name: Linux - Pack CLI build
needs: configure-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.configure-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
#- name: Setup Container Registry
# uses: Sgitario/setup-container-registry@v1
# with:
# host: container-registry.local
- name: Install Pack
# Version needed: >=0.30
run: |
(curl -sSL "https://github.com/buildpacks/pack/releases/download/${{ matrix.pack_cli_version }}/pack-${{ matrix.pack_cli_version }}-linux.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack)
echo "Pack version"
pack version
echo "Enable experimental features in pack"
pack config experimental true
- name: Test Nodejs UBI extension
run: |
CONTAINER_NAME=nodejs-pack-test
CONTAINER_IMAGE=registry.local/$CONTAINER_NAME:1.0
BUILDER_IMAGE=${{ matrix.builder-image }}
# Not needed anymore to build the UBI builder image as it is now available
# Checkout
# git clone https://github.com/paketo-community/ubi-nodejs-extension.git
# echo "Build the detect and generate binaries of the extension"
# ${{ github.workspace }}/ubi-nodejs-extension/scripts/build.sh
# echo "Creating the builder image and push it"
# BUILDER_PATH=./builder.toml
# cat <<EOF > builder.toml
# description = "Sample builder that uses ubi Node.js extension to support Node.js apps"
# [[buildpacks]]
# uri = "docker://gcr.io/paketo-buildpacks/nodejs:1.8.0"
# version = "1.8.0"
#
# [lifecycle]
# version = "0.18.2"
#
# [[order]]
# [[order.group]]
# id = "paketo-buildpacks/nodejs"
# version = "1.8.0"
#
# [[extensions]]
# id = "paketo-community/ubi-nodejs-extension"
# version = "0.0.1"
# uri = "file:///${{ github.workspace }}/ubi-nodejs-extension"
#
# [[order-extensions]]
# [[order-extensions.group]]
# id = "paketo-community/ubi-nodejs-extension"
# version = "0.0.1"
#
# [stack]
# id = "io.buildpacks.stacks.ubi8"
# build-image = "paketocommunity/build-ubi-base"
# run-image = "paketocommunity/run-ubi-base"
# EOF
#
# pack builder create $BUILDER_IMAGE --config $BUILDER_PATH --publish
echo "Build the nodejs app"
git clone https://github.com/nodeshift-starters/nodejs-rest-http.git
pack build $CONTAINER_IMAGE --path ./nodejs-rest-http --builder $BUILDER_IMAGE -v
echo "Run the nodejs http application & test ..."
.github/testNodeHello.sh $CONTAINER_NAME $CONTAINER_IMAGE