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

Get CommandBox latest stable version on CI runtime #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 14 additions & 4 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ jobs:

steps:
- uses: actions/checkout@v2
- run: curl --location -O https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/box-repo.json

- name: Extract version from box-repo.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .versioning.stableVersion box-repo.json'

- run: echo "BOX_VERSION=${{ steps.version.outputs.value }}" >> $GITHUB_ENV

- run: echo ${{ env.BOX_VERSION }}

- name: Build and Publish the Docker image
run: |
date_version=$(date +%Y.%m)
echo $date_version > ./version.txt
docker build . --file Dockerfile --tag minibox
docker build . --file Dockerfile --tag minibox --build-arg BOX_VERSION=${{ env.BOX_VERSION }}
docker-compose build
docker-compose up
echo "${{ secrets.DOCKER_PASS }}" | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
Expand All @@ -37,6 +49,4 @@ jobs:
docker push $IMAGE_ID:latest
date_version=$(date +%Y.%m)
docker tag minibox $IMAGE_ID:$date_version
docker push $IMAGE_ID:$date_version


docker push $IMAGE_ID:$date_version
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ FROM azul/zulu-openjdk-alpine:8-jre AS build

RUN apk add zip unzip curl

ARG BOX_VERSION=5.8.0

RUN mkdir /opt/box
RUN curl --location -o /opt/box/box https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/5.8.0/box-light
RUN curl --location -o /opt/box/box https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/$BOX_VERSION/box-light

RUN chmod -R a+rx /opt/box/box

Expand Down Expand Up @@ -48,7 +50,7 @@ RUN rm -f /root/.CommandBox/engine/cfml/cli/cfml-web/context/lucee-applet.jar
RUN rm -f /root/.CommandBox/engine/cfml/cli/cfml-web/context/lucee-admin.lar
RUN rm -f /root/.CommandBox/engine/cfml/cli/cfml-web/context/lucee-doc.lar

RUN curl --location -o /opt/box/box-thin https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/5.8.0/box-thin
RUN curl --location -o /opt/box/box-thin https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/$BOX_VERSION/box-thin

RUN mv /opt/box/box-thin /opt/box/box

Expand Down