Skip to content

🐞 JS image boots properly now #21

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

Merged
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
15 changes: 14 additions & 1 deletion .github/workflows/container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
containerfiles: ${{ steps.prep.outputs.containerfile }}
tags: ${{ steps.prep.outputs.tags }}
tags: ${{ steps.prep.outputs.tags }} ${{ github.sha }}
platforms: ${{ steps.prep.outputs.platforms }}
build-args: |
CONTEXT_DIR=./${{ matrix.app }}/
Expand All @@ -82,6 +82,19 @@ jobs:
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}

- name: Test the built container
run: |
set -Eeuxo pipefail
podman run --rm \
-d \
--name showcase \
-u 10001 \
-p 38080:8080 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
trap 'podman kill showcase' EXIT
curl --retry-all-errors --retry 8 -v -L --fail \
http://localhost:38080/

- name: Login to registry
uses: redhat-actions/podman-login@v1
if: ${{ steps.prep.outputs.push == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion expressjs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
npm run build

clean: frontend.clean
rm -rfv build
rm -rfv build public
rm -rf node_modules

frontend: frontend.build
Expand Down
2 changes: 1 addition & 1 deletion expressjs/src/lib/project.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { isDirectory } = require('./fs.js')
const packageJson = require('../../package.json')
const { gitDescribeSync } = require('git-describe')

class Project {
constructor({ group, artifact, version, platform }) {
Expand Down Expand Up @@ -28,6 +27,7 @@ class Project {
}

async function resolveGitDescribe() {
const { gitDescribeSync } = require('git-describe')
return gitDescribeSync(__dirname)
.raw
.replace(/-dirty$/, '')
Expand Down