Skip to content

Commit

Permalink
chore: Upgrade WAIOps to 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nastacio committed Mar 9, 2022
1 parent 5bbf9ab commit 3630417
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 53 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,6 @@ on:
branches: [main]

jobs:
calc:
runs-on: ubuntu-latest

env:
HOME: /root
PIPELINE_DEBUG: 1

steps:
- uses: actions/checkout@v3

- name: Determine extent of testing
run: tests/postbuild/calc-settings.sh "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" "${GITHUB_SHA}" "${GITHUB_BASE_REF}"

- name: Upload global pull secret result
uses: actions/upload-artifact@v1
with:
name: calc
path: test-sh-gps.txt

- name: Upload semver result
uses: actions/upload-artifact@v1
with:
name: calc
path: test-sh-labels.txt

- name: Upload workers result
uses: actions/upload-artifact@v1
with:
name: calc
path: test-sh-workers.txt

test:
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }}
runs-on: ubuntu-latest
Expand All @@ -54,13 +23,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
with:
name: calc
- name: Determine extent of testing
run: tests/postbuild/calc-settings.sh "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" "${GITHUB_SHA}" "${GITHUB_BASE_REF}"

- name: Ensures target cluster exists
run: tests/postbuild/cluster.sh --ensure --wait -t ibmcloud -n "gitops-${GITHUB_HEAD_REF}" --apikey "${IBM_CLOUD_API_KEY}" --workers "$(cat calc/test-sh-workers.txt)" --worker-flavor "c3c.32x64" --global-pull-secret "$(cat calc/test-sh-gps.txt)"
run: tests/postbuild/cluster.sh --ensure --wait -t ibmcloud -n "gitops-${GITHUB_HEAD_REF}" --apikey "${IBM_CLOUD_API_KEY}" --workers "$(cat test-sh-workers.txt)" --worker-flavor "c3c.32x64" --global-pull-secret "$(cat test-sh-gps.txt)"

- name: Deploy Argo and Cloud Paks to the cluster
run: tests/postbuild/gitops.sh --setup-server -t ibmcloud -n "gitops-${GITHUB_HEAD_REF}" --gitops-repo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" --gitops-branch "${GITHUB_HEAD_REF}" --apikey "${IBM_CLOUD_API_KEY}" --application-labels "$(cat calc/test-sh-labels.txt)"
run: tests/postbuild/gitops.sh --setup-server -t ibmcloud -n "gitops-${GITHUB_HEAD_REF}" --gitops-repo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" --gitops-branch "${GITHUB_HEAD_REF}" --apikey "${IBM_CLOUD_API_KEY}" --application-labels "$(cat test-sh-labels.txt)"
4 changes: 2 additions & 2 deletions config/cloudpaks/cp4aiops/install-aimgr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.0
version: 0.6.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "3.2.0"
appVersion: "3.2.1"
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: "500"
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/sync-wave: "230"
argocd.argoproj.io/hook: Sync
name: post-cp4aiops-adjust-certs
namespace: openshift-gitops
spec:
Expand Down
4 changes: 2 additions & 2 deletions config/cloudpaks/cp4aiops/install-emgr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.0
version: 0.6.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "3.2.0"
appVersion: "3.2.1"
7 changes: 4 additions & 3 deletions tests/postbuild/calc-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ cleanRun() {
rm -rf "${WORKDIR}"
fi
}
trap cleanRun EXIT


#
Expand All @@ -58,13 +57,15 @@ function extract_branch_delta() {
git clone "${git_repo}" cloudpak-gitops \
&& cd cloudpak-gitops \
&& git config pull.rebase false \
result=1
|| result=1

if [ ${result} -eq 0 ]; then
git pull origin "${git_source_branch}" || result=1
git diff "${git_target_branch}" --name-only | tee "${output_file}" \
git diff "${git_target_branch}" origin/main --name-only | tee "${output_file}" \
&& result=0 \
|| result=1

cat "${branch_delta_output_file}"
fi

return ${result}
Expand Down
7 changes: 0 additions & 7 deletions tests/postbuild/gitops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,6 @@ EOF
&& argocd app wait "${app_name}" \
--sync \
--health \
&& argocd app wait "${cp}-operators" \
--sync \
--health \
--timeout 1800 \
&& argocd app wait "${cp}-resources" \
--sync \
--health \
--timeout 10800 \
&& log "INFO: Synchronization of ${app_name} complete." \
|| cp_result=1
Expand Down

0 comments on commit 3630417

Please sign in to comment.