diff --git a/.ci/ansible/Containerfile.j2 b/.ci/ansible/Containerfile.j2 index 66f15a72..471c41ca 100644 --- a/.ci/ansible/Containerfile.j2 +++ b/.ci/ansible/Containerfile.j2 @@ -30,6 +30,12 @@ RUN pip3 install {%- endif -%} {%- endfor %} +{% if pulp_scenario_envs is defined and pulp_scenario_envs %} +{% for key, value in pulp_scenario_envs.items() %} +ENV {{ key | upper }}={{ value }} +{% endfor %} +{% endif %} + USER pulp:pulp RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost \ /usr/local/bin/pulpcore-manager collectstatic --clear --noinput --link diff --git a/.github/template_gitref b/.github/template_gitref index 82904ba9..1e1e36aa 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-246-g98b439a +2021.08.26-248-g5eb40c0 diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 4e891dfc..5d47c054 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -24,11 +24,11 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a55b5508..bf52069e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: ready-to-ship: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" - name: Install requirements @@ -45,10 +45,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" # lint_requirements contains tools needed for flake8, etc. @@ -98,11 +98,11 @@ jobs: deprecations-lowerbounds: ${{ steps.deprecations.outputs.deprecations-lowerbounds }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml index d98961ed..76b16324 100644 --- a/.github/workflows/create-branch.yml +++ b/.github/workflows/create-branch.yml @@ -9,10 +9,6 @@ name: Create New Release Branch on: workflow_dispatch: - inputs: - name: - description: "Branch name (e.g. 3.14)" - required: true env: RELEASE_WORKFLOW: true @@ -25,12 +21,12 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 0 path: pulp_ostree - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" @@ -46,26 +42,27 @@ jobs: env: SECRETS_CONTEXT: ${{ toJson(secrets) }} - - name: Verify that branch name matches current version string on main branch + - name: Determine new branch name working-directory: pulp_ostree run: | - X_Y_VERSION=$(grep version setup.py | sed -rn 's/version="(.*)\.0((a[0-9]+)|(b[0-9]+))?\.dev",/\1/p' | awk '{$1=$1};1') - if [[ "$X_Y_VERSION" != "${{ inputs.name }}" ]] + # Just to be sure... + git checkout main + NEW_BRANCH="$(bump2version --dry-run --list release | sed -Ene 's/^new_version=([[:digit:]]+\.[[:digit:]]+)\..*$/\1/p')" + if [ -z "$NEW_BRANCH" ] then - echo "Branch name doesn't match the current version string $X_Y_VERSION." + echo Could not determine the new branch name. exit 1 fi + echo "NEW_BRANCH=${NEW_BRANCH}" >> "$GITHUB_ENV" - - name: Create ${{ inputs.name }} release branch + - name: Create release branch working-directory: pulp_ostree run: | - git checkout -b ${{ inputs.name }} - git push origin ${{ inputs.name }} + git branch "${NEW_BRANCH}" - name: Bump version on main branch working-directory: pulp_ostree run: | - git checkout main bump2version --no-commit minor - name: Remove entries from CHANGES directory @@ -88,3 +85,8 @@ jobs: Bump minor version [noissue] delete-branch: true + + - name: Push release branch + working-directory: pulp_ostree + run: | + git push origin "${NEW_BRANCH}" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9dbeedd2..712dbc38 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -35,11 +35,11 @@ jobs: - TEST: lowerbounds steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" @@ -168,11 +168,11 @@ jobs: changelog: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.11" @@ -207,11 +207,11 @@ jobs: TEST: publish steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4908860..f6d76f64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,11 +30,11 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" @@ -79,7 +79,7 @@ jobs: with: name: pulp_ostree.tar - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" - uses: ruby/setup-ruby@v1 @@ -201,7 +201,7 @@ jobs: with: name: pulp_ostree.tar - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 3c5f12c0..59c69621 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -88,6 +88,7 @@ if [ "$TEST" = "s3" ]; then minio_access_key: "'$MINIO_ACCESS_KEY'"\ minio_secret_key: "'$MINIO_SECRET_KEY'"\ pulp_scenario_settings: null\ +pulp_scenario_envs: null\ ' vars/main.yaml export PULP_API_ROOT="/rerouted/djnd/" fi @@ -107,6 +108,7 @@ if [ "$TEST" = "azure" ]; then command: "azurite-blob --blobHost 0.0.0.0 --cert /etc/pulp/azcert.pem --key /etc/pulp/azkey.pem"' vars/main.yaml sed -i -e '$a azure_test: true\ pulp_scenario_settings: null\ +pulp_scenario_envs: null\ ' vars/main.yaml fi diff --git a/.github/workflows/update-labels.yml b/.github/workflows/update-labels.yml index 1d048e1e..121afb83 100644 --- a/.github/workflows/update-labels.yml +++ b/.github/workflows/update-labels.yml @@ -19,7 +19,7 @@ jobs: update_backport_labels: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" - name: Configure Git with pulpbot name and email diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index e1da4e7f..f37e87fc 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -30,7 +30,7 @@ jobs: path: plugin_template fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: "3.8" @@ -69,5 +69,32 @@ jobs: commit-message: | Update CI files + [noissue] + delete-branch: true + - uses: actions/checkout@v3 + with: + path: pulp_ostree + ref: '2.1' + fetch-depth: 0 + + - name: Run update + working-directory: pulp_ostree + run: | + ../plugin_template/scripts/update_ci.sh + + - name: Create Pull Request for CI files + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.RELEASE_TOKEN }} + path: pulp_ostree + committer: pulpbot + author: pulpbot + title: 'Update CI files for branch 2.1' + body: '[noissue]' + branch: 'update-ci/2.1' + base: '2.1' + commit-message: | + Update CI files + [noissue] delete-branch: true diff --git a/template_config.yml b/template_config.yml index c65df6c3..15badd34 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,7 +1,7 @@ # This config represents the latest values used when running the plugin-template. Any settings that # were not present before running plugin-template have been added with their default values. -# generated with plugin_template@2021.08.26-244-g7bb934c +# generated with plugin_template@2021.08.26-248-g5eb40c0 additional_repos: [] api_root: /pulp/ @@ -13,7 +13,7 @@ check_stray_pulpcore_imports: true ci_env: {} ci_trigger: '{pull_request: {branches: [''*'']}}' ci_update_branches: - - '2.1' +- '2.1' ci_update_docs: true ci_update_release_behavior: null cli_package: pulp-cli-ostree @@ -48,12 +48,14 @@ plugin_snake: pulp_ostree post_job_template: null pre_job_template: null publish_docs_to_pulpprojectdotorg: true +pulp_envs_azure: null +pulp_envs_gcp: null +pulp_envs_s3: null pulp_scheme: https pulp_settings: null pulp_settings_azure: null pulp_settings_gcp: null pulp_settings_s3: null -pulp_settings_stream: null pulpprojectdotorg_key_id: null pydocstyle: true pypi_username: pulp