Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
  • Loading branch information
pmacik committed Jun 7, 2021
1 parent 44d186c commit 8b04f0e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
11 changes: 11 additions & 0 deletions .github/actions/setup-cli/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ runs:
./hack/start-minikube.sh start --kubernetes-version=v${K8S_VERSION} --driver=$CONTAINER_RUNTIME --cpus $(nproc) --memory 5g
fi
shell: bash

- id: podman-info
run: |
if [ "${{ inputs.start-minikube }}" == "true" ]; then
eval $(minikube podman-env)
kubectl get nodes -o yaml
kubectl cluster-info
fi
podman ps
podman info
shell: bash
5 changes: 1 addition & 4 deletions .github/actions/setup-podman/setup-podman-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
set -x

mkdir -p $HOME/.config/containers
sed -e "s,REGISTRY_PREFIX,${REGISTRY_PREFIX},g" ./.github/actions/setup-podman/registries.conf > $HOME/.config/containers/registries.conf

ls -la $HOME/.config/containers/registries.conf
cat $HOME/.config/containers/registries.conf
sed -e "s,REGISTRY_PREFIX,${REGISTRY_PREFIX},g" ./.github/actions/setup-podman/registries_template.conf > $HOME/.config/containers/registries.conf
cp -rvf ./.github/actions/setup-podman/podman ${GITHUB_WORKSPACE}/bin/podman
12 changes: 6 additions & 6 deletions .github/workflows/pr-checks-build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
OPM_VERSION: "1.15.2"
CONTAINER_RUNTIME: "podman"
ARTIFACTS: "artifacts"
REGISTRY_PREFIX: quay.io/redhat-developer
REPO: servicebinding-operator
REGISTRY_PREFIX: quay.io/pmacik
REPO: sbo-pr-checks

jobs:
build-operator-images:
Expand Down Expand Up @@ -50,9 +50,9 @@ jobs:
mkdir -p ${ARTIFACTS}
echo -n "${OPERATOR_INDEX_IMAGE_REF}" > ${ARTIFACTS}/operator-index.ref
echo -n "${OPERATOR_BUNDLE_IMAGE_REF}" > ${ARTIFACTS}/operator-bundle.ref
echo -n "${OPERATOR_IMAGE_REF}" > ${ARTIFACTS}/operator-image.ref
echo "export OPERATOR_IMAGE_REF=${OPERATOR_IMAGE_REF}" >> ${ARTIFACTS}/operator.refs
echo "export OPERATOR_BUNDLE_IMAGE_REF=${OPERATOR_BUNDLE_IMAGE_REF}" >> ${ARTIFACTS}/operator.refs
echo "export OPERATOR_INDEX_IMAGE_REF=${OPERATOR_INDEX_IMAGE_REF}" >> ${ARTIFACTS}/operator.refs
podman stop reg
tar -czvf ${ARTIFACTS}/registry.tar.gz -C ${GITHUB_WORKSPACE} registry
Expand All @@ -67,4 +67,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: operator-refs-${{github.event.pull_request.number}}-${{github.event.pull_request.head.sha}}
path: ${{env.ARTIFACTS}}/*.ref
path: ${{env.ARTIFACTS}}/*.refs
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks-clean-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [closed]

env:
OPERATOR_REPO_REF: quay.io/redhat-developer/servicebinding-operator
OPERATOR_REPO_REF: quay.io/pmacik/sbo-pr-checks

jobs:
clean-operator-images:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/pr-checks-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- master

env:
REGISTRY_PREFIX: quay.io/redhat-developer
REPO: servicebinding-operator
REGISTRY_PREFIX: quay.io/pmacik
REPO: sbo-pr-checks

jobs:
push-operator-images:
Expand All @@ -18,9 +18,6 @@ jobs:
- name: Checkout Git Repository
uses: actions/checkout@v2

- name: Setup CLI
uses: ./.github/actions/setup-cli

- name: Wait for build
uses: lewagon/wait-on-check-action@1b1630e169116b58a4b933d5ad7effc46d3d312d
with:
Expand All @@ -41,10 +38,8 @@ jobs:
- name: Push operator, bundle and index images
run: |
podman images
set -x
for tag in $(skopeo list-tags --tls-verify=false docker://localhost:5000/${REPO} | jq -r '.Tags[] | select(startswith("pr-${{github.event.pull_request.number}}-"))'); do
sha=$(skopeo inspect --tls-verify=false docker://localhost:5000/${REPO}:${tag} | jq -r '.Digest')
skopeo copy --dest-creds ${{secrets.QUAY_USERNAME}}:${{secrets.QUAY_TOKEN}} --all --src-tls-verify=false docker://localhost:5000/${REPO}@${sha} docker://${REGISTRY_PREFIX}/${REPO}@${sha}
skopeo copy --dest-creds ${{secrets.QUAY_USERNAME}}:${{secrets.QUAY_TOKEN}} --all --src-tls-verify=false docker://localhost:5000/${REPO}@${sha} docker://${REGISTRY_PREFIX}/${REPO}:${tag}
done
6 changes: 2 additions & 4 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
K8S_VERSION: "1.19.2"
MINIKUBE_VERSION: "1.15.1"
TEST_ACCEPTANCE_CLI: "kubectl"
CONTAINER_RUNTIME: "podman"
TEST_RESULTS: "out/acceptance-tests"

jobs:
Expand Down Expand Up @@ -103,7 +102,7 @@ jobs:
- name: Acceptance tests
timeout-minutes: 60
run: |
export OPERATOR_INDEX_IMAGE_REF=$(cat operator-index.ref)
source ./operator.refs
export CATSRC_NAME=sbo-pr-checks
make SKIP_REGISTRY_LOGIN=true -o registry-login test-acceptance-with-bundle
Expand Down Expand Up @@ -178,8 +177,7 @@ jobs:
- name: Acceptance tests against vanilla k8s without OLM
timeout-minutes: 60
run: |
export OPERATOR_BUNDLE_IMAGE_REF=$(cat operator-bundle.ref)
export OPERATOR_INDEX_IMAGE_REF=$(cat operator-index.ref)
source ./operator.refs
eval $(minikube docker-env)
make release-manifests
Expand Down

0 comments on commit 8b04f0e

Please sign in to comment.