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

Db2 s390x #1289

Draft
wants to merge 86 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
9d47378
[minor]support s390x arch
Rajeshri-Shil Sep 25, 2024
aa7b379
Update .functions.sh
Rajeshri-Shil Sep 25, 2024
7628911
[minor]support s390x arch
Rajeshri-Shil Sep 25, 2024
cc843cb
[patch]update build-cli.yml
Rajeshri-Shil Sep 25, 2024
4a5945a
[patch]added docker-manifest.sh
Rajeshri-Shil Sep 25, 2024
aa05eda
updated app.py
Rajeshri-Shil Sep 25, 2024
4525845
updated suite_mongocfg.yml.j2
Rajeshri-Shil Sep 26, 2024
df9d645
added new catalog s390x
Rajeshri-Shil Sep 30, 2024
321ab21
false
Rajeshri-Shil Sep 30, 2024
012559f
updated install.yml.j2
Rajeshri-Shil Sep 30, 2024
502c645
updated install.yml.j2
Rajeshri-Shil Sep 30, 2024
f92099d
[minor] adding architecture
shajeena Sep 30, 2024
14b7528
Update app.py
Rajeshri-Shil Oct 1, 2024
0e7fe34
Update app.py
Rajeshri-Shil Oct 1, 2024
ed94fd2
updated app.py
Rajeshri-Shil Oct 1, 2024
a3ba0af
updated app.py
Rajeshri-Shil Oct 3, 2024
fa5953f
updated app.py
Rajeshri-Shil Oct 3, 2024
5cda0f7
updated app.py
Rajeshri-Shil Oct 3, 2024
0031424
[patch]app.py
Rajeshri-Shil Oct 3, 2024
91ffa8b
[patch]app.py
Rajeshri-Shil Oct 3, 2024
0408cde
[minor] conditional check for s390x
shajeena Oct 4, 2024
fe29303
[minor]changes in update/app.py
Rajeshri-Shil Oct 7, 2024
e36b5d0
[minor]changes in update/app.py
Rajeshri-Shil Oct 7, 2024
56833d0
[minor]changes in update/app.py
Rajeshri-Shil Oct 7, 2024
e55a033
[minor]changes in update/app.py
Rajeshri-Shil Oct 8, 2024
6e9bef5
[minor]changes in update/app.py
Rajeshri-Shil Oct 8, 2024
bca186a
[minor] rebase for s390x
shajeena Oct 8, 2024
3e28c91
[minor] rebase for s390x
shajeena Oct 8, 2024
c966881
[minor] rebase for s390x
shajeena Oct 8, 2024
1f24ecf
[minor] rebase for s390x
shajeena Oct 8, 2024
35d5f4e
[minor]changes in update/app.py
Rajeshri-Shil Oct 8, 2024
057178e
[minor]changes in uninstall/app.py
Rajeshri-Shil Oct 8, 2024
124d1eb
[minor]changes in install/app.py
Rajeshri-Shil Oct 8, 2024
bc81679
[minor]changes in install/app.py
Rajeshri-Shil Oct 8, 2024
1a14699
[minor]changes in install/app.py
Rajeshri-Shil Oct 8, 2024
dfaaf92
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
258cb0b
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
94f3b24
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
0a8c568
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
07afba1
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
24b7618
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
3148f80
[minor]changes in install/app.py
Rajeshri-Shil Oct 9, 2024
15151a5
revert changes
Rajeshri-Shil Oct 9, 2024
c3485b7
[minor] rebase for s390x
shajeena Oct 10, 2024
f4c90e9
[minor] rebase for s390x
shajeena Oct 10, 2024
8b3ff20
[minor] rebase for s390x
shajeena Oct 10, 2024
43a7c5d
[minor] rebase for s390x
shajeena Oct 10, 2024
062f5d2
[minor] rebase for s390x
shajeena Oct 10, 2024
01d133d
[minor] rebase for s390x
shajeena Oct 10, 2024
95c250f
[minor] rebase for s390x
shajeena Oct 10, 2024
e036a84
[minor] rebase for s390x
shajeena Oct 10, 2024
e54dd71
[minor] rebase for s390x
shajeena Oct 10, 2024
18c9366
[minor] rebase for s390x
shajeena Oct 10, 2024
31b86b6
[minor] rebase for s390x
shajeena Oct 10, 2024
df1f6a5
[minor] rebase for s390x
shajeena Oct 10, 2024
830bc1e
[minor] rebase for s390x
shajeena Oct 10, 2024
d16c1a9
[minor] rebase for s390x
shajeena Oct 10, 2024
279f4c7
[minor] rebase for s390x
shajeena Oct 10, 2024
d96b94d
[minor] rebase for s390x
shajeena Oct 11, 2024
44ed1b5
[minor] rebase for s390x
shajeena Oct 11, 2024
9331419
[minor] rebase for s390x
shajeena Oct 11, 2024
a141536
[minor]updated
Rajeshri-Shil Oct 17, 2024
07c9e18
Update mongodbSettings.py
Rajeshri-Shil Oct 17, 2024
35c988a
Update manageSettings.py
Rajeshri-Shil Oct 17, 2024
8c897ec
added s390x catalog for manage
Rajeshri-Shil Oct 17, 2024
9fd4644
changes digest
Rajeshri-Shil Oct 17, 2024
646275a
updated with master
Rajeshri-Shil Oct 18, 2024
2239842
updated with master
Rajeshri-Shil Oct 18, 2024
3614939
updated s390x catalog digest
Rajeshri-Shil Oct 18, 2024
0ababd1
[patch] Provide CLI automation to upgrade CPD v4.8 installations to v…
stonepd Oct 2, 2024
4af71ed
[minor] Reorganize scheduler tests - removed selenium and added pytes…
alequint Oct 2, 2024
757f6e0
[minor] Support October Catalog (#1234)
anilprajapatiibm Oct 4, 2024
2cbab86
[minor] Make install plan configurable for all subscriptions in gitop…
sanjayprab Oct 4, 2024
608327c
[patch] Remove installplan from non-gitops pipeline (#1285)
whitfiea Oct 4, 2024
f986172
[patch] Isolate foundation tests in Mobile Testng pipeline (#1300)
leo-miran Oct 16, 2024
7d50b24
[patch] Refactor manage tests (#1296)
unnati-solanki-git Oct 17, 2024
8b850a3
[patch] MASCORE-3268: Support for ICR values via env vars (#1251)
rawa-resul Oct 17, 2024
59034fe
[minor]support s390x arch
Rajeshri-Shil Sep 25, 2024
6516fad
[patch]app.py
Rajeshri-Shil Oct 3, 2024
e516784
[minor]changes in update/app.py
Rajeshri-Shil Oct 8, 2024
bd1ad0c
[minor] rebase for s390x
shajeena Oct 8, 2024
ecf299b
updated with master
Rajeshri-Shil Oct 18, 2024
fc02164
updated with master
Rajeshri-Shil Oct 18, 2024
772714b
updated with master
Rajeshri-Shil Oct 18, 2024
8a99709
added workspaces in sls
Rajeshri-Shil Oct 18, 2024
26b8338
added new catalog
Rajeshri-Shil Oct 18, 2024
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
225 changes: 70 additions & 155 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: python/dist

build-container:
build-container-amd64:
name: Build Container Image
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[doc]') }}
Expand Down Expand Up @@ -180,6 +180,7 @@ jobs:
wget --header="Authorization:Bearer $ARTIFACTORY_TOKEN" $ARTIFACTORY_GENERIC_RELEASE_URL/ibm-mas/ansible-devops/latest/ibm-mas_devops-latest.tar.gz -O $GITHUB_WORKSPACE/image/cli/install/ibm-mas_devops.tar.gz
fi


# 3. Download Built Artifacts
# -------------------------------------------------------------------------------------------
- name: Download the tekton file built in the other job
Expand All @@ -201,23 +202,17 @@ jobs:
- name: Build the container image
id: docker-build
run: |
$GITHUB_WORKSPACE/build/bin/docker-build.sh -n ibmmas -i cli
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io
$GITHUB_WORKSPACE/build/bin/docker-build.sh -n ibmmas -i cli --target-platform amd64
docker images

- name: Push the container image
id: docker-push
run: |
docker tag ibmmas/cli quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}
docker tag ibmmas/cli:${{ env.DOCKER_TAG }}-amd64 quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}-amd64
docker images
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io
docker push quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}

- name: Push the container image (master)
id: docker-push-master
if: github.ref == 'refs/heads/master'
run: |
docker tag ibmmas/cli quay.io/ibmmas/cli:master
docker images
docker push quay.io/ibmmas/cli:master
docker push quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}-amd64

- name: Push the container image (latest)
id: docker-push-latest
Expand Down Expand Up @@ -248,9 +243,9 @@ jobs:
path: ${{github.workspace}}/reports
retention-days: 30

pyinstaller-windows:
name: Build Windows CLI
runs-on: windows-latest
build-container-s390x:
name: Build Container Image
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[doc]') }}
needs:
- build-tekton
Expand All @@ -261,172 +256,92 @@ jobs:
- name: Checkout
id: checkout
uses: actions/checkout@v4

# 2. Run PyInstaller
# -------------------------------------------------------------------------------------------
- name: Download the tekton file
id: download-tekton
uses: actions/download-artifact@v4
with:
name: ibm-mas-tekton.yaml
path: ${{ github.workspace }}/python/src/mas/cli/templates/

- name: Download the python package
id: download-python
uses: actions/download-artifact@v4
# Without this option, we don't get the tag information
with:
name: mas_cli.tar.gz
path: ${{ github.workspace }}/
fetch-depth: 0

- name: Build the Windows executable
id: build
- name: Initialise the build system
id: init
run: |
python -m pip install --upgrade pip virtualenv
python -m venv .venv
.\.venv\Scripts\activate
python -m pip install "./mas_cli.tar.gz[dev]"
python -m pip list
pyinstaller --distpath python/dist --onefile --noconfirm --collect-data mas.devops --collect-data mas.cli python/src/mas-cli

# 3. Upload and Publish
# -------------------------------------------------------------------------------------------
- name: Upload mas-cli
id: upload
uses: actions/upload-artifact@v4
with:
name: mas-cli-windows-amd64
path: ${{ github.workspace }}/python/dist/mas-cli.exe
retention-days: 30
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh
$GITHUB_WORKSPACE/build/bin/initbuild.sh
source $GITHUB_WORKSPACE/build/bin/.functions.sh

- name: Publish the new cli
id: publish
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/python/dist/mas-cli.exe
asset_name: mas-cli-windows-amd64.exe
tag: ${{ github.ref }}
overwrite: true

pyinstaller-linux:
name: Build Linux CLI
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[doc]') }}
needs:
- build-tekton
- build-python
steps:
# 1. Initialize the build
# 2. Download Ansible collection from Artifactory
# -------------------------------------------------------------------------------------------
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Download Ansible collection from Artifactory
id: download-ansible
if: contains(fromJson('["push", "workflow_dispatch", "repository_dispatch"]'), github.event_name)
env:
ARTIFACTORY_GENERIC_RELEASE_URL: ${{ secrets.ARTIFACTORY_GENERIC_RELEASE_URL }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
run: |
if [[ -e $GITHUB_WORKSPACE/image/cli/install/ibm-mas_devops.tar.gz ]]; then
echo "Found a local Ansible collection to be used in $GITHUB_WORKSPACE/image/cli/install/ibm-mas_devops.tar.gz! Skip download from Artifactory..."
else
echo "Downloading from ***/ibm-mas/ansible-devops/latest/ibm-mas_devops-latest.tar.gz"
wget --header="Authorization:Bearer $ARTIFACTORY_TOKEN" $ARTIFACTORY_GENERIC_RELEASE_URL/ibm-mas/ansible-devops/latest/ibm-mas_devops-latest.tar.gz -O $GITHUB_WORKSPACE/image/cli/install/ibm-mas_devops.tar.gz
fi

# 2. Run PyInstaller
# 3. Download Built Artifacts
# -------------------------------------------------------------------------------------------
- name: Download the tekton file
- name: Download the tekton file built in the other job
id: download-tekton
uses: actions/download-artifact@v4
with:
name: ibm-mas-tekton.yaml
path: ${{ github.workspace }}/python/src/mas/cli/templates/
path: ${{ github.workspace }}/image/cli/mascli/templates/

- name: Download the python package
id: download-python
uses: actions/download-artifact@v4
with:
name: mas_cli.tar.gz
path: ${{ github.workspace }}/
path: ${{ github.workspace }}/image/cli/install/

- name: Build the Linux executable
id: build
# 4. CLI container image
# -------------------------------------------------------------------------------------------
- name: Build the container image
id: docker-build
run: |
python -m pip install --upgrade pip virtualenv
python -m venv .venv
source .venv/bin/activate
python -m pip install ./mas_cli.tar.gz[dev]
python -m pip list
pyinstaller --distpath python/dist --onefile --noconfirm --collect-data mas.devops --collect-data mas.cli python/src/mas-cli
$GITHUB_WORKSPACE/build/bin/docker-build.sh -n ibmmas -i cli --target-platform s390x

# 3. Upload and Publish
# -------------------------------------------------------------------------------------------
- name: Upload mas-cli
id: upload
uses: actions/upload-artifact@v4
with:
name: mas-cli-linux-amd64
path: ${{ github.workspace }}/python/dist/mas-cli
retention-days: 30
- name: Push the container image
id: docker-push
run: |
docker images
docker tag ibmmas/cli:${{ env.DOCKER_TAG }}-s390x quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}-s390x
docker images
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io
docker push quay.io/ibmmas/cli:${{ env.DOCKER_TAG }}-s390x

- name: Publish the new cli
id: publish
- name: Push the container image (latest)
id: docker-push-latest
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/python/dist/mas-cli
asset_name: mas-cli-linux-amd64
tag: ${{ github.ref }}
overwrite: true

pyinstaller-macos:
name: Build MacOS CLI
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[doc]') }}
needs:
- build-tekton
- build-python
run: |
docker tag ibmmas/cli quay.io/ibmmas/cli:latest
docker images
docker push quay.io/ibmmas/cli:latest

build-cli-manifest:
runs-on: ubuntu-latest
needs: [ build-container-amd64, build-container-s390x ]
steps:
# 1. Initialize the build
# 1. Setup
# -------------------------------------------------------------------------------------------
- name: Checkout
id: checkout
uses: actions/checkout@v4

# 2. Run PyInstaller
# -------------------------------------------------------------------------------------------
- name: Download the tekton file
id: download-tekton
uses: actions/download-artifact@v4
with:
name: ibm-mas-tekton.yaml
path: ${{ github.workspace }}/python/src/mas/cli/templates/

- name: Download the python package
id: download-python
uses: actions/download-artifact@v4
# Without this option, we don't get the tag information
with:
name: mas_cli.tar.gz
path: ${{ github.workspace }}/

- name: Build the Linux executable
id: build
fetch-depth: 0
- name: Initialise the build system
run: |
python -m pip install --upgrade pip virtualenv
python -m venv .venv
source .venv/bin/activate
python -m pip install ./mas_cli.tar.gz[dev]
python -m pip list
pyinstaller --distpath python/dist --onefile --noconfirm --collect-data mas.devops --collect-data mas.cli python/src/mas-cli

# 3. Upload and Publish
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh
$GITHUB_WORKSPACE/build/bin/initbuild.sh
source $GITHUB_WORKSPACE/build/bin/.functions.sh
# 3. Manifest and publish release base container image of cli
# -------------------------------------------------------------------------------------------
- name: Upload mas-cli
id: upload
uses: actions/upload-artifact@v4
with:
name: mas-cli-macos-arm64
path: ${{ github.workspace }}/python/dist/mas-cli
retention-days: 30

- name: Publish the new cli
id: publish
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/python/dist/mas-cli
asset_name: mas-cli-macos-arm64
tag: ${{ github.ref }}
overwrite: true
- name: Publish release cli
run: |
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io
$GITHUB_WORKSPACE/build/bin/docker-manifest.sh -n ibmmas -i cli --target-platforms amd64,s390x
32 changes: 32 additions & 0 deletions build/bin/.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,38 @@ function echo_highlight() {
echo "${COLOR_MAGENTA}$1"
}

#Install buildx
# -----------------------------------------------------------------------------
# Useful links:
# - https://docs.docker.com/engine/reference/commandline/buildx_build/#output
# - https://docs.docker.com/build/building/multi-platform/
# - https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408
# - https://stackoverflow.com/questions/65365797/docker-buildx-exec-user-process-caused-exec-format-error
function install_buildx() {
# docker buildx use mybuilder &> /dev/null
echo "install_buildx"
# if [ "$?" != "0" ]; then
echo "inside0 install_buildx"
mkdir -vp ~/.docker/cli-plugins/
#https://download.docker.com/linux/rhel/8/x86_64/stable/Packages/docker-buildx-plugin-0.16.1-1.el8.x86_64.rpm
curl --silent -L "https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
chmod a+x ~/.docker/cli-plugins/docker-buildx
echo "inside 1 install_buildx"
sudo apt-get update
echo "inside 1-1 install_buildx"
sudo apt-get install -y qemu-user-static
echo "inside2 install_buildx"
qemu-aarch64-static --version
echo "inside3 install_buildx"
sudo apt-get install -y binfmt-support
update-binfmts --version
docker buildx create --name mybuilder
docker buildx use mybuilder
# fi
docker version || exit 1
docker buildx version || exit 1
docker buildx inspect --bootstrap || exit 1
}

# These should be loaded already, but just incase!
# ------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions build/bin/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
find docs -type f -name '*.md' -exec sed -i \
-e 's/@@CLI_LATEST_VERSION@@/11.1.3/g' \
-e 's/@@MAS_PREVIOUS_CHANNEL@@/8.11.x/g' \
-e 's/@@MAS_PREVIOUS_CATALOG@@/v8-240730-amd64/g' \
-e 's/@@MAS_PREVIOUS_CATALOG@@/v8-240827-amd64/g' \
-e 's/@@MAS_LATEST_CHANNEL@@/9.0.x/g' \
-e 's/@@MAS_LATEST_CHANNEL_MANAGE@@/9.0.x/g' \
-e 's/@@MAS_LATEST_CATALOG@@/v9-240827-amd64/g' \
-e 's/@@MAS_LATEST_CATALOG@@/v9-241003-amd64/g' \
{} \;

python -m pip install -q mkdocs mkdocs-redirects
Expand Down
Loading