WebSphere Liberty S2I version 23.0.0.12 #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: WebSphere Liberty s2i Image Deployment | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
LANG: en_US.UTF-8 | |
S2I_URI: https://api.github.com/repos/openshift/source-to-image/releases/tags/v1.3.9 | |
CEKIT_VERSION: 4.8.0 | |
DOCKER_USERID: ${{ secrets.DOCKER_USERID }} | |
LIBERTY_VERSION: ${{ github.event.release.tag_name }} | |
jobs: | |
wasci: | |
name: WebSphere Liberty s2i Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: n1hility/cancel-previous-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Docker configuration | |
if: env.DOCKER_USERID == '' | |
run: | | |
echo "Docker configuration is incomplete, push to dockerhub will be skipped. " | |
- name: Setup required system packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install krb5-multidev libkrb5-dev | |
- name: Verify latest centos image is present | |
run: | | |
docker image ls | grep centos || true | |
docker pull centos:7 | |
docker pull centos/s2i-base-centos7 | |
docker image ls | grep centos | |
- name: Setup virtualenv and install cekit and required packages | |
run: | | |
sudo pip install virtualenv | |
mkdir ~/cekit${{ env.CEKIT_VERSION }} | |
virtualenv ~/cekit${{ env.CEKIT_VERSION }} | |
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate | |
pip install cekit==${{ env.CEKIT_VERSION }} docker==5.0.3 docker-squash odcs behave lxml urllib3==1.26.15 packaging==21.3 | |
- name: install s2i binary | |
run: | | |
echo ===== Installing s2i from ${{ env.S2I_URL }} ===== | |
mkdir /tmp/s2i/ && cd /tmp/s2i/ | |
curl -s ${{ env.S2I_URI }} \ | |
| grep browser_download_url \ | |
| grep linux-amd64 \ | |
| cut -d '"' -f 4 \ | |
| wget -qi - | |
tar xvf source-to-image*.gz | |
sudo mv s2i /usr/bin | |
which s2i | |
s2i version | |
- name: Build and Test | |
run: | | |
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate | |
make | |
docker image ls | |
- name: Push to dockerhub | |
if: env.DOCKER_USERID != '' | |
run: | | |
LIBERTY_VERSION=${{ env.LIBERTY_VERSION }} | |
JAVA8_IMAGE_VERSION=${LIBERTY_VERSION}-java8 | |
JAVA8_RUNTIME_IMAGE_VERSION=${LIBERTY_VERSION}-runtime-java8 | |
JAVA11_IMAGE_VERSION=${LIBERTY_VERSION}-java11 | |
JAVA11_RUNTIME_IMAGE_VERSION=${LIBERTY_VERSION}-runtime-java11 | |
JAVA17_IMAGE_VERSION=${LIBERTY_VERSION}-java17 | |
JAVA17_RUNTIME_IMAGE_VERSION=${LIBERTY_VERSION}-runtime-java17 | |
NAMESPACE=ibmcom | |
PLATFORM=websphere-liberty-s2i | |
IMAGE_NAME=${NAMESPACE}/${PLATFORM} | |
echo Pushing the following versions of image ${IMAGE_NAME} to docker hub: | |
echo ${JAVA8_IMAGE_VERSION}, ${JAVA8_RUNTIME_IMAGE_VERSION}, ${JAVA11_IMAGE_VERSION}, ${JAVA11_RUNTIME_IMAGE_VERSION}, ${JAVA17_IMAGE_VERSION}, ${JAVA17_RUNTIME_IMAGE_VERSION} | |
docker login -u="${{ secrets.DOCKER_USERID }}" -p="${{ secrets.DOCKER_PASSWORD }}" | |
docker push ${IMAGE_NAME}:${JAVA8_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA8_IMAGE_VERSION} ${IMAGE_NAME}:java8 | |
docker push ${IMAGE_NAME}:java8 | |
docker push ${IMAGE_NAME}:${JAVA8_RUNTIME_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA8_RUNTIME_IMAGE_VERSION} ${IMAGE_NAME}:runtime-java8 | |
docker push ${IMAGE_NAME}:runtime-java8 | |
docker push ${IMAGE_NAME}:${JAVA11_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA11_IMAGE_VERSION} ${IMAGE_NAME}:java11 | |
docker push ${IMAGE_NAME}:java11 | |
docker push ${IMAGE_NAME}:${JAVA11_RUNTIME_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA11_RUNTIME_IMAGE_VERSION} ${IMAGE_NAME}:runtime-java11 | |
docker push ${IMAGE_NAME}:runtime-java11 | |
docker push ${IMAGE_NAME}:${JAVA17_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA17_IMAGE_VERSION} ${IMAGE_NAME}:java17 | |
docker push ${IMAGE_NAME}:java17 | |
docker push ${IMAGE_NAME}:${JAVA17_RUNTIME_IMAGE_VERSION} | |
docker tag ${IMAGE_NAME}:${JAVA17_RUNTIME_IMAGE_VERSION} ${IMAGE_NAME}:runtime-java17 | |
docker push ${IMAGE_NAME}:runtime-java17 |