diff --git a/.github/template_gitref b/.github/template_gitref index bff6d64c4d..aff44d14c2 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.04.08-88-ga67f224-dirty +2021.04.08-99-gd8b54c6 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e495cc8ea1..dcb90e378b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ # # For more info visit https://github.com/pulp/plugin_template --- -name: Pulp CI +name: Galaxy CI on: {pull_request: {branches: ['*']}, push: {branches: ['*']}} jobs: diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml index a1ba173099..da2b94434f 100644 --- a/.github/workflows/create-branch.yml +++ b/.github/workflows/create-branch.yml @@ -67,8 +67,8 @@ jobs: - name: Make a PR with version bump uses: peter-evans/create-pull-request@v3 with: - committer: pulpbot - author: pulpbot + committer: ansible + author: ansible branch: minor-version-bump base: master title: Bump minor version diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 683d2d5530..fc4288f7aa 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,7 +5,7 @@ # # For more info visit https://github.com/pulp/plugin_template --- -name: Pulp Nightly CI/CD +name: Galaxy Nightly CI/CD on: schedule: # * is a special character in YAML so you have to quote this string diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10fe4fc60a..da379ea26d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,10 +45,10 @@ jobs: pip install bandersnatch bump2version gitpython python-redmine towncrier==19.9.0 wheel echo ::endgroup:: - - name: Configure Git with pulpbot name and email + - name: Configure Git with ansible name and email run: | - git config --global user.name 'pulpbot' - git config --global user.email 'pulp-infra@redhat.com' + git config --global user.name 'ansible' + git config --global user.email 'ansible-infra@redhat.com' - name: Setting secrets run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT" @@ -202,10 +202,10 @@ jobs: with: ruby-version: "2.6" - - name: Configure Git with pulpbot name and email + - name: Configure Git with ansible name and email run: | - git config --global user.name 'pulpbot' - git config --global user.email 'pulp-infra@redhat.com' + git config --global user.name 'ansible' + git config --global user.email 'ansible-infra@redhat.com' - name: Untar repository run: | @@ -249,13 +249,14 @@ jobs: - name: Create Pull Request for Changelog uses: peter-evans/create-pull-request@v3 with: - committer: pulpbot - author: pulpbot - branch: ${{ github.event.inputs.release }}-changelog + committer: ansible + author: ansible + branch: changelog/${{ github.event.inputs.release }} base: master title: 'Building changelog for ${{ github.event.inputs.release }}' body: '[noissue]' commit-message: | Building changelog for ${{ github.event.inputs.release }} + [noissue] delete-branch: true diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index 02a7e6e3f6..1600d29300 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -31,6 +31,7 @@ COMMIT_MSG=$(git log --format=%B --no-merges -1) export COMMIT_MSG if [[ "$TEST" == "upgrade" ]]; then + pip install -r functest_requirements.txt git checkout -b ci_upgrade_test cp -R .github /tmp/.github cp -R .ci /tmp/.ci @@ -38,8 +39,6 @@ if [[ "$TEST" == "upgrade" ]]; then rm -rf .ci .github cp -R /tmp/.github . cp -R /tmp/.ci . - # Pin deps - sed -i "s/~/=/g" requirements.txt fi if [[ "$TEST" == "plugin-from-pypi" ]]; then @@ -115,6 +114,7 @@ fi git clone --depth=1 https://github.com/pulp/pulpcore.git --branch 3.14 cd pulpcore + if [ -n "$PULPCORE_PR_NUMBER" ]; then git fetch --depth=1 origin pull/$PULPCORE_PR_NUMBER/head:$PULPCORE_PR_NUMBER git checkout $PULPCORE_PR_NUMBER @@ -123,29 +123,35 @@ cd .. git clone --depth=1 https://github.com/pulp/pulp_ansible.git --branch 0.9.0 +cd pulp_ansible + if [ -n "$PULP_ANSIBLE_PR_NUMBER" ]; then - cd pulp_ansible git fetch --depth=1 origin pull/$PULP_ANSIBLE_PR_NUMBER/head:$PULP_ANSIBLE_PR_NUMBER git checkout $PULP_ANSIBLE_PR_NUMBER - cd .. fi +cd .. + git clone --depth=1 https://github.com/pulp/pulp_container.git --branch 2.7.1 +cd pulp_container + if [ -n "$PULP_CONTAINER_PR_NUMBER" ]; then - cd pulp_container git fetch --depth=1 origin pull/$PULP_CONTAINER_PR_NUMBER/head:$PULP_CONTAINER_PR_NUMBER git checkout $PULP_CONTAINER_PR_NUMBER - cd .. fi +cd .. + git clone --depth=1 https://github.com/ansible/galaxy-importer.git --branch v0.3.4 +cd galaxy-importer + if [ -n "$GALAXY_IMPORTER_PR_NUMBER" ]; then - cd galaxy-importer git fetch --depth=1 origin pull/$GALAXY_IMPORTER_PR_NUMBER/head:$GALAXY_IMPORTER_PR_NUMBER git checkout $GALAXY_IMPORTER_PR_NUMBER - cd .. fi +cd .. + # Intall requirements for ansible playbooks diff --git a/.github/workflows/scripts/check_commit.sh b/.github/workflows/scripts/check_commit.sh index f5da10715d..db76b23248 100755 --- a/.github/workflows/scripts/check_commit.sh +++ b/.github/workflows/scripts/check_commit.sh @@ -17,7 +17,7 @@ pip3 install requests echo ::endgroup:: -for sha in $(curl $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g') +for sha in $(curl -H "Authorization: token $GITHUB_TOKEN" $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g') do python3 .ci/scripts/validate_commit_message.py $sha VALUE=$? diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index ba7731c7c9..145c63e40d 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -24,10 +24,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Configure Git with pulpbot name and email + - name: Configure Git with ansible name and email run: | - git config --global user.name 'pulpbot' - git config --global user.email 'pulp-infra@redhat.com' + git config --global user.name 'ansible' + git config --global user.email 'ansible-infra@redhat.com' - name: Run update run: | @@ -36,14 +36,13 @@ jobs: - name: Create Pull Request for CI files uses: peter-evans/create-pull-request@v3 with: - committer: pulpbot - author: pulpbot - branch: ${GITHUB_REF#refs/heads/}-update-ci-files - base: ${GITHUB_REF#refs/heads/} - title: 'Update CI for ${GITHUB_REF#refs/heads/}' - body: '[noissue]' + token: ${{ secrets.RELEASE_TOKEN }} + committer: ansible + author: ansible + title: 'Update CI files' + body: 'No-Issue' commit-message: | - Update CI files for ${GITHUB_REF#refs/heads/} + Update CI files - [noissue] + No-Issue delete-branch: true diff --git a/.gitleaks.toml b/.gitleaks.toml index c18a26b624..9bdea002c6 100644 --- a/.gitleaks.toml +++ b/.gitleaks.toml @@ -1,3 +1,3 @@ [allowlist] description = "Our test install exports a test only MINIO ACCESS KEY" - files = [ '''.github/workflows/scripts/install.sh''' ] + files = [ '''.github/workflows/scripts/install.sh''', '''dev/Dockerfile.base''' ] diff --git a/setup.py b/setup.py index 430e61c06d..2935facbf1 100644 --- a/setup.py +++ b/setup.py @@ -88,7 +88,6 @@ def run(self): requirements = [ - "Django~=2.2.23", "galaxy-importer==0.3.4", "pulpcore>=3.14.0,<3.15.0", "pulp-ansible>=0.9.0,<0.10.0", @@ -98,12 +97,9 @@ def run(self): "django-automated-logging" ] - -is_on_dev_environment = ( - "COMPOSE_PROFILE" in os.environ and "DEV_SOURCE_PATH" in os.environ - and os.environ.get("LOCK_REQUIREMENTS") == "0" -) -if is_on_dev_environment: +# next line can be replaced via sed in ci scripts/post_before_install.sh +unpin_requirements = os.getenv("LOCK_REQUIREMENTS") == "0" +if unpin_requirements: """ To enable the installation of local dependencies e.g: a local fork of pulp_ansible checked out to specific branch/version. @@ -112,7 +108,10 @@ def run(self): ref: https://github.com/ansible/galaxy_ng/wiki/Development-Setup #steps-to-run-dev-environment-with-specific-upstream-branch """ - DEV_SOURCE_PATH = os.environ.get("DEV_SOURCE_PATH", "").split(":") + DEV_SOURCE_PATH = os.getenv( + "DEV_SOURCE_PATH", + default="pulpcore:pulp_ansible:pulp_container:galaxy_importer" + ).split(":") DEV_SOURCE_PATH += [path.replace("_", "-") for path in DEV_SOURCE_PATH] requirements = [ re.sub(r"""(=|^|~|<|>|!)([\S]+)""", "", req) diff --git a/template_config.yml b/template_config.yml index 548a1a7586..ff65392327 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,33 +1,34 @@ # 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.04.08-87-g2136629-dirty +# generated with plugin_template@2021.04.08-99-gd8b54c6 additional_repos: - - name: pulp_ansible - org: pulp - bindings: true - branch: 0.9.0 - - name: pulp_container - org: pulp - bindings: true - branch: 2.7.1 - - name: galaxy-importer - bindings: false - org: ansible - branch: v0.3.4 +- bindings: true + branch: 0.9.0 + name: pulp_ansible + org: pulp +- bindings: true + branch: 2.7.1 + name: pulp_container + org: pulp +- bindings: false + branch: v0.3.4 + name: galaxy-importer + org: ansible black: false check_commit_message: false check_gettext: true check_manifest: true check_openapi_schema: true check_stray_pulpcore_imports: true -core_import_allowed: - - "pulpcore.app.*viewsets" - - "pulpcore\\.app.*admin" - - "ProgressReportSerializer" cherry_pick_automation: false -ci_trigger: "{pull_request: {branches: ['*']}, push: {branches: ['*']}}" +ci_env: {} +ci_trigger: '{pull_request: {branches: [''*'']}, push: {branches: [''*'']}}' +core_import_allowed: +- pulpcore.app.*viewsets +- pulpcore\.app.*admin +- ProgressReportSerializer coverage: false deploy_client_to_pypi: false deploy_client_to_rubygems: false @@ -38,6 +39,7 @@ docker_fixtures: false docs_test: false flake8: true issue_tracker: null +noissue_marker: 'No-Issue' plugin_app_label: galaxy plugin_camel: GalaxyNG plugin_camel_short: Galaxy @@ -48,12 +50,12 @@ plugin_dash_short: galaxy plugin_default_branch: master plugin_name: galaxy_ng plugin_snake: galaxy_ng -post_job_template: +post_job_template: name: update_manifest - path: "galaxy_ng/.github/post-job-template.yml.j2" + path: galaxy_ng/.github/post-job-template.yml.j2 pre_job_template: name: check_commit - path: "galaxy_ng/.github/pre-job-template.yml.j2" + path: galaxy_ng/.github/pre-job-template.yml.j2 publish_docs_to_pulpprojectdotorg: false pulp_scheme: http pulp_settings: @@ -62,11 +64,13 @@ pulp_settings: rh_entitlement_required: insights pulpcore_branch: '3.14' pulpcore_pip_version_specifier: null +pulpcore_revision: null pulpprojectdotorg_key_id: null pydocstyle: true pypi_username: null python_version: '3.8' redmine_project: null +release_email: ansible-infra@redhat.com release_user: ansible stable_branch: stable sync_ci: true @@ -80,4 +84,3 @@ travis_notifications: null update_redmine: false upgrade_range: [] -