Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Jul 25, 2023
1 parent 1af5c58 commit 931758f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 26 deletions.
63 changes: 41 additions & 22 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,14 @@ jobs:
- os: ubuntu-22.10
- os: ubuntu-22.04
container: true
- os: ubuntu-22.04
- os: ubuntu-22.04
documentation: true
- os: ubuntu-20.04
- os: centos-8
- os: centos-7
- os: amazonlinux
ln: true
- os: ubuntu-20.04
ln: true
- os: centos-8
- os: centos-7
ln: true
- os: amazonlinux
fail-fast: false

steps:
Expand Down Expand Up @@ -136,11 +133,14 @@ jobs:
echo "docker_tag_candidate_baseX=$docker_build_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
echo "docker_tag_candidate_base=$docker_build_label:candidate-9.2.x" >> $GITHUB_OUTPUT
echo "docker_tag_candidate=$docker_build_label:${{ needs.preamble.outputs.candidate_branch }}" >> $GITHUB_OUTPUT
docker_core_label=hpccsystems/platform-core-${{ matrix.os }}
echo "docker_tag_community_baseX=$docker_core_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
echo "docker_tag_community_base=$docker_core_label:candidate-9.2.x" >> $GITHUB_OUTPUT
echo "docker_tag_community=$docker_core_label:${{ needs.preamble.outputs.community_tag }}" >> $GITHUB_OUTPUT
echo "docker_tag_internal=$docker_core_label:${{ needs.preamble.outputs.internal_tag }}" >> $GITHUB_OUTPUT
docker_community_label=hpccsystems/platform-core-${{ matrix.os }}
echo "docker_tag_community_baseX=$docker_community_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
echo "docker_tag_community_base=$docker_community_label:candidate-9.2.x" >> $GITHUB_OUTPUT
echo "docker_tag_community=$docker_community_label:${{ needs.preamble.outputs.community_tag }}" >> $GITHUB_OUTPUT
docker_internal_label=ln/platform-core-${{ matrix.os }}
echo "docker_tag_internal_baseX=$docker_internal_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
echo "docker_tag_internal_base=$docker_internal_label:candidate-9.2.x" >> $GITHUB_OUTPUT
echo "docker_tag_internal=$docker_internal_label:${{ needs.preamble.outputs.internal_tag }}" >> $GITHUB_OUTPUT
- name: Print vars
run: |
Expand Down Expand Up @@ -175,7 +175,6 @@ jobs:
cache-to: type=inline

- name: CMake Packages
if: ${{ !matrix.container && !matrix.ln && !matrix.documentation }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
Expand All @@ -193,7 +192,6 @@ jobs:
- name: CMake Containerized Packages
if: ${{ matrix.container }}
id: container
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
Expand All @@ -205,9 +203,6 @@ jobs:
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
k8s_deb_path=$(ls -t ${{ needs.preamble.outputs.folder_build }}/*k8s.deb 2>/dev/null | head -1)
k8s_deb_file=$(basename "$k8s_deb_path")
echo "k8s_deb_file=$k8s_deb_file" >> $GITHUB_OUTPUT
- name: CMake documentation
if: ${{ matrix.documentation }}
Expand All @@ -221,16 +216,23 @@ jobs:
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/EN_US && zip ALL_HPCC_DOCS_EN_US-${{ needs.preamble.outputs.community_tag }}.zip *.pdf"
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/PT_BR && zip ALL_HPCC_DOCS_PT_BR-${{ needs.preamble.outputs.community_tag }}.zip *.pdf"
- name: Upload Assets
- name: Upload Assets (community)
uses: ncipollo/[email protected]
if: ${{ !matrix.ln }}
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: "${{ needs.preamble.outputs.folder_build }}/*.deb,${{ needs.preamble.outputs.folder_build }}/*.rpm,${{ needs.preamble.outputs.folder_build }}/Release/docs/*.zip,${{ needs.preamble.outputs.folder_build }}/Release/docs/EN_US/*.zip,${{ needs.preamble.outputs.folder_build }}/Release/docs/PT_BR/*.zip,${{ needs.preamble.outputs.folder_build }}/docs/EN_US/EclipseHelp/*.zip,${{ needs.preamble.outputs.folder_build }}/docs/EN_US/HTMLHelp/*.zip,${{ needs.preamble.outputs.folder_build }}/docs/PT_BR/HTMLHelp/*.zip"

- name: Create Community Image
- name: Create Docker Image (find deb)
id: container
if: ${{ matrix.container }}
run: |
k8s_pkg_path=$(ls -t ${{ needs.preamble.outputs.folder_build }}/*64_k8s.deb 2>/dev/null | head -1)
k8s_pkg_file=$(basename "$k8s_pkg_path")
echo "k8s_pkg_file=$k8s_pkg_file" >> $GITHUB_OUTPUT
- name: Create Docker Image (community)
uses: docker/build-push-action@v4
if: ${{ matrix.container }}
with:
Expand All @@ -239,7 +241,7 @@ jobs:
context: ${{ needs.preamble.outputs.folder_build }}
push: ${{ github.repository_owner == 'hpcc-systems' }}
build-args: |
DEB_FILE=${{ steps.container.outputs.k8s_deb_file }}
PKG_FILE=${{ steps.container.outputs.k8s_pkg_file }}
tags: |
${{ steps.vars.outputs.docker_tag_community }}
${{ steps.vars.outputs.docker_tag_community_base }}
Expand All @@ -259,7 +261,24 @@ jobs:
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
- name: Upload LN Assets
- name: Create Docker Image (internal)
uses: docker/build-push-action@v4
if: ${{ matrix.ln && matrix.container }}
with:
builder: ${{ steps.buildx.outputs.name }}
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/platform-core-${{ matrix.os }}.dockerfile
context: ${{ needs.preamble.outputs.folder_build }}
outputs: |
type=tar,dest=${{ needs.preamble.outputs.folder_build }}/platform-core-${{ matrix.os }}.tar
build-args: |
PKG_FILE=${{ steps.container.outputs.k8s_pkg_file }}
tags: |
${{ steps.vars.outputs.docker_tag_internal }}
${{ steps.vars.outputs.docker_tag_internal_base }}
cache-from: |
type=registry,ref=${{ steps.vars.outputs.docker_tag_community_base }}
- name: Upload Assets (internal)
if: ${{ matrix.ln }}
uses: ncipollo/[email protected]
with:
Expand All @@ -270,7 +289,7 @@ jobs:
repo: LN
token: ${{ secrets.LNB_TOKEN }}
tag: ${{ needs.preamble.outputs.internal_tag }}
artifacts: "${{ needs.preamble.outputs.folder_build }}/hpccsystems-platform-internal*.deb,${{ needs.preamble.outputs.folder_build }}/hpccsystems-platform-internal*.rpm"
artifacts: "${{ needs.preamble.outputs.folder_build }}/hpccsystems-platform-internal*.deb,${{ needs.preamble.outputs.folder_build }}/hpccsystems-platform-internal*.rpm,${{ needs.preamble.outputs.folder_build }}/platform-core-${{ matrix.os }}.tar"

- name: Cleanup Environment
if: always()
Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ RUN mkdir /var/log/HPCCSystems && chown hpcc:hpcc /var/log/HPCCSystems
RUN mkdir /var/lock/HPCCSystems && chown hpcc:hpcc /var/lock/HPCCSystems
RUN mkdir /var/run/HPCCSystems && chown hpcc:hpcc /var/run/HPCCSystems

ARG DEB_FILE=hpccsystems-platform-community_9.2.4-1jammy_amd64_k8s.deb
COPY ./${DEB_FILE} /tmp/${DEB_FILE}
RUN dpkg -i /tmp/${DEB_FILE} && \
ARG PKG_FILE=hpccsystems-platform-community_9.2.4-1jammy_amd64_k8s.deb
COPY ./${PKG_FILE} /tmp/${PKG_FILE}
RUN dpkg -i /tmp/${PKG_FILE} && \
apt-get install -f && \
rm /tmp/${DEB_FILE}
rm /tmp/${PKG_FILE}

USER hpcc
ENV PATH="/opt/HPCCSystems/bin:${PATH}"
Expand Down

0 comments on commit 931758f

Please sign in to comment.