Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and lubosmj committed Dec 10, 2023
1 parent 564f828 commit a9d1803
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 19 deletions.
20 changes: 7 additions & 13 deletions .ci/ansible/Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@ FROM {{ ci_base | default("ghcr.io/pulp/pulp-ci-centos:" + pulp_container_tag) }

# Add source directories to container
{% for item in plugins %}
{% if item.source.startswith("./") or item.ci_requirements | default(false) %}
ADD ./{{ item.name }} ./{{ item.name }}
{% endif %}
{% endfor %}

# Install python packages
# S3 botocore needs to be patched to handle responses from minio during 0-byte uploads
# Hacking botocore (https://github.com/boto/botocore/pull/1990)

RUN pip3 install
{%- for item in plugins -%}
{%- if item.name == "pulp-certguard" -%}
{{ " " }}python-dateutil rhsm
{%- endif -%}
{{ " " }}{{ item.source }}
{%- if item.name == "pulpcore" -%}
{%- if s3_test | default(false) -%}
[s3]
{%- elif azure_test | default(false) -%}
[azure]
{%- elif gcp_test | default(false) -%}
[google]
{{ " " }}git+https://github.com/fabricio-aguiar/botocore.git@fix-100-continue
{%- endif -%}
{%- for item in plugins -%}
{{ " " }}{{ item.source }}
{%- if item.lowerbounds | default(false) -%}
{{ " " }}-c ./{{ item.name }}/lowerbounds_constraints.txt
{%- endif -%}
{%- if item.ci_requirements | default(false) -%}
{{ " " }}-r ./{{ item.name }}/ci_requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-290-g4d54366
2021.08.26-296-g466c79b
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defaults:
working-directory: "pulp_container"

jobs:
ready-to-ship:
check-commits:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
Expand Down Expand Up @@ -75,3 +75,19 @@ jobs:
run: |
cat deprecations-*.txt | sort -u
! cat deprecations-*.txt | grep '[^[:space:]]'
ready-to-ship:
# This is a dummy dependent task to have a single entry for the branch protection rules.
runs-on: "ubuntu-latest"
needs:
- "check-commits"
- "lint"
- "test"
if: "always()"
steps:
- name: "Collect needed jobs results"
working-directory: "."
run: |
echo '${{toJson(needs)}}' | jq -r 'to_entries[]|select(.value.result!="success")|.key + ": " + .value.result'
echo '${{toJson(needs)}}' | jq -e 'to_entries|map(select(.value.result!="success"))|length == 0'
echo "CI says: Looks good!"
3 changes: 1 addition & 2 deletions .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ then
fi

if [[ "$TEST" = "lowerbounds" ]]; then
python3 .ci/scripts/calc_deps_lowerbounds.py > lowerbounds_requirements.txt
mv lowerbounds_requirements.txt requirements.txt
python3 .ci/scripts/calc_deps_lowerbounds.py > lowerbounds_constraints.txt
fi

if [ -f $POST_BEFORE_INSTALL ]; then
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,32 @@ then
fi

cd .ci/ansible/
PLUGIN_SOURCE="${PLUGIN_NAME}"
if [ "$TEST" = "s3" ]; then
PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[s3]"
fi
if [ "$TEST" = "azure" ]; then
PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[azure]"
fi

cat >> vars/main.yaml << VARSYAML
image:
name: pulp
tag: "ci_build"
plugins:
- name: pulp_container
source: "${PLUGIN_NAME}"
source: "${PLUGIN_SOURCE}"
VARSYAML
if [[ -f ../../ci_requirements.txt ]]; then
cat >> vars/main.yaml << VARSYAML
ci_requirements: true
VARSYAML
fi
if [ "$TEST" = "lowerbounds" ]; then
cat >> vars/main.yaml << VARSYAML
lowerbounds: true
VARSYAML
fi

cat >> vars/main.yaml << VARSYAML
services:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/scripts/install_python_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ DOCSYAML
# Building the bindings docs
mkdocs build

tar cvf ../../pulp_container/container-python-client-docs.tar ./docs
# Pack the built site.
tar cvf ../../pulp_container/container-python-client-docs.tar ./site
popd
popd

0 comments on commit a9d1803

Please sign in to comment.