Skip to content

Commit

Permalink
remove tp docker build steps
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Zhang <[email protected]>
  • Loading branch information
Tom Zhang committed Feb 28, 2022
1 parent 6e113f5 commit a99d7d9
Showing 1 changed file with 2 additions and 122 deletions.
124 changes: 2 additions & 122 deletions .github/workflows/build-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ on:
required: false
default: false
type: boolean
BUILD_DOCKER:
description: 'Build Docker'
required: false
default: false
type: boolean
BUILD_DOCKER_SOURCES:
description: 'Build Docker sources'
required: false
default: false
type: boolean
BUILD_KUBERNETES:
description: 'Build Kubernetes'
required: false
Expand Down Expand Up @@ -129,16 +119,6 @@ jobs:
if [[ "${{ github.event.inputs.BUILD_PSIANDSMPE }}" == true ]]; then
BUILD_WHAT=$BUILD_WHAT", PSIANDSMPE"
fi
echo INPUTS_BUILD_DOCKER=${{ github.event.inputs.BUILD_DOCKER }} >> $GITHUB_ENV
if [[ "${{ github.event.inputs.BUILD_DOCKER }}" == true ]]; then
BUILD_WHAT=$BUILD_WHAT", DOCKER"
fi
echo INPUTS_BUILD_DOCKER_SOURCES=${{ github.event.inputs.BUILD_DOCKER_SOURCES }} >> $GITHUB_ENV
if [[ "${{ github.event.inputs.BUILD_DOCKER_SOURCES }}" == true ]]; then
BUILD_WHAT=$BUILD_WHAT", DOCKER_SOURCES"
fi
echo INPUTS_BUILD_KUBERNETES=${{ github.event.inputs.BUILD_KUBERNETES }} >> $GITHUB_ENV
if [[ "${{ github.event.inputs.BUILD_KUBERNETES }}" == true ]]; then
Expand All @@ -163,15 +143,8 @@ jobs:
total_bld_time += base_pax_bld_time
if ('${{ github.event_name }}' == 'workflow_dispatch') {
if ('${{ github.event.inputs.BUILD_SMPE }}' == 'true') {
total_bld_time += smpe_bld_time_addon
}
if ('${{ github.event.inputs.BUILD_DOCKER }}' == 'true') {
total_bld_time += docker_bld_time_addon
}
}
if ('${{ github.event_name }}' == 'workflow_dispatch' && '${{ github.event.inputs.BUILD_SMPE }}' == 'true') {
total_bld_time += smpe_bld_time_addon
const finish_time = new Date(new Date().getTime() + total_bld_time*60*1000);
Expand Down Expand Up @@ -274,99 +247,6 @@ jobs:
.pax/smpe-build-logs.pax.Z
.pax/AZWE*
- name: '[TP_ZLINUX_DOCKER 1] Configure SSH'
if: env.INPUTS_BUILD_DOCKER == 'true'
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.ZLINUX_SSH_KEY }}" > ~/.ssh/zlinux.key
chmod 600 ~/.ssh/zlinux.key
cat >>~/.ssh/config <<END
Host zlinux
HostName ${{ secrets.ZLINUX_HOST }}
User ${{ secrets.ZLINUX_SSH_USER }}
IdentityFile ~/.ssh/zlinux.key
StrictHostKeyChecking no
LogLevel QUIET
END
shell: bash

- name: '[TP_ZLINUX_DOCKER 2] Build zLinux Docker'
if: env.INPUTS_BUILD_DOCKER == 'true'
timeout-minutes: 60
uses: zowe-actions/shared-actions/tech-preview-build-zlinux-docker@main
with:
run-number: ${{ github.run_number }}
zowe-pax-jfrog-upload-target: ${{ steps.publish.outputs.zowe-pax-jfrog-upload-target }}
build-docker-sources: ${{ env.INPUTS_BUILD_DOCKER_SOURCES }}
dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }}
zlinux-ssh-server: zlinux
zlinux-ssh-key-passphrase: ${{ secrets.ZLINUX_SSH_PASSPHRASE }}

- name: '[TP_ZLINUX_DOCKER 3] Upload zlinux docker to artifactory'
timeout-minutes: 5
if: env.INPUTS_BUILD_DOCKER == 'true'
uses: zowe-actions/shared-actions/publish@main
with:
artifacts: server-bundle.s390x.tar

- name: '[TP_ZLINUX_DOCKER 4] Upload zlinux docker sources to artifactory'
timeout-minutes: 5
if: env.INPUTS_BUILD_DOCKER_SOURCES == 'true'
uses: zowe-actions/shared-actions/publish@main
with:
artifacts: server-bundle.sources.s390x.tar

- name: '[TP_LINUX_DOCKER 1] Download zowe.pax'
timeout-minutes: 5
if: env.INPUTS_BUILD_DOCKER == 'true'
uses: zowe-actions/shared-actions/jfrog-download@main
with:
source-path-or-pattern: ${{ steps.publish.outputs.zowe-pax-jfrog-upload-target }}
default-target-path: 'containers/server-bundle/zowe.pax'
extra-options: --flat=true
expected-count: 1

- name: '[TP_LINUX_DOCKER 2] Build Linux Docker'
if: env.INPUTS_BUILD_DOCKER == 'true'
working-directory: containers/server-bundle
run: |
# copy utils to docker build folder
mkdir -p utils
cp -r ../utils/* ./utils
# show files
echo ">>>>>>>>>>>>>>>>>> sub-node: "
pwd && ls -ltr .
# build docker image
docker login -u "${{ secrets.DOCKERHUB_USER }}" -p "${{ secrets.DOCKERHUB_PASSWORD }}"
docker build -t ompzowe/server-bundle:amd64 .
docker save -o server-bundle.amd64.tar ompzowe/server-bundle:amd64
if [ "${{ env.INPUTS_BUILD_DOCKER_SOURCES }}" == "true" ] ; then
docker build -f Dockerfile.sources --build-arg BUILD_PLATFORM=amd64 -t ompzowe/server-bundle:amd64-sources .
docker save -o server-bundle.sources.amd64.tar ompzowe/server-bundle:amd64-sources
fi
# show files
echo ">>>>>>>>>>>>>>>>>> docker tar: "
pwd && ls -ltr server-bundle.*
- name: '[TP_LINUX_DOCKER 3] Upload linux docker to artifactory'
timeout-minutes: 5
if: env.INPUTS_BUILD_DOCKER == 'true'
uses: zowe-actions/shared-actions/publish@main
with:
artifacts: containers/server-bundle/server-bundle.amd64.tar

- name: '[TP_LINUX_DOCKER 4] Upload linux docker sources to artifactory'
timeout-minutes: 5
if: env.INPUTS_BUILD_DOCKER_SOURCES == 'true'
uses: zowe-actions/shared-actions/publish@main
with:
artifacts: containers/server-bundle/server-bundle.sources.amd64.tar

- name: '[K8S 1] Build Kubernetes'
timeout-minutes: 10
if: env.INPUTS_BUILD_KUBERNETES == 'true'
Expand Down

0 comments on commit a99d7d9

Please sign in to comment.