Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic release preparation workflow #393

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

carabasdaniel
Copy link
Contributor

No description provided.

@carabasdaniel carabasdaniel marked this pull request as ready for review February 4, 2021 13:10
@carabasdaniel carabasdaniel requested review from a team as code owners February 4, 2021 13:10
@sanfrancrisko sanfrancrisko merged commit b8667b5 into puppetlabs:main Feb 4, 2021
Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several changes required on the workflow. Also missing: link to passing run of applying this change.

if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
echo STEP_ID="auto_release" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost the same STEP_ID as in L34 - use something more approriate in either place

persist-credentials: false

- name: Activate Ruby 2.6
uses: actions/setup-ruby@v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and the caching step below are replaced by

- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
if: ${{ github.repository_owner == '<%= common['owner'] %>' }}
with:
ruby-version: "2.7"
bundler-cache: true

- name: Activate Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: "2.6"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're unable to use ruby2.7 for something we need to ticket up the blocker and link here.


- name: Bundler Setup
run: |
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note how the new setup ruby action (see above) also makes this obsolete


- name: Append PDK to Gemfile
run: |
echo "gem 'pdk'" >> Gemfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be done before the caching step calculates the hashFiles


- name: "PDK Release prep"
run: |
buildevents cmd $TRACE_ID $STEP_ID 'pdk release prep' -- ./vendor/bins/pdk release prep --force
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be a gem or can we use the https://github.com/puppetlabs/pdk-docker image, or what about the puppet/iac_release docker container @carabasdaniel built?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try it with the pdk-docker image -> the iac_release container is built as a wrap-around the pdk release command and uses a mountable ssh key (we don't want to use that here)

git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Auto-Release prep"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Release Prep v#{version} according to the docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it to Release Prep v#{version} according to documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants