Skip to content

ci: replace travis completely with github actions#4554

Merged
estroz merged 6 commits intooperator-framework:masterfrom
estroz:feature/actions-releases
Mar 3, 2021
Merged

ci: replace travis completely with github actions#4554
estroz merged 6 commits intooperator-framework:masterfrom
estroz:feature/actions-releases

Conversation

@estroz
Copy link
Copy Markdown
Member

@estroz estroz commented Feb 18, 2021

Recreation of #4544.

Description of the change:

  • .github/workflows/deploy.yml: set up image builds andreleasing with github actions
  • Makefile,release/Makefile: remove multiarch image build targets, since all non-host arch builds can be done in action configs
  • *: remove Travis CI config from project and references in docs

Motivation for the change: for various reasons (cost, reliability, debuggability, visibility) Travis is no longer viable for the operator-sdk project. Github Actions, via docker buildx, can support cross-platform image builds, release automation, and is way more configurable/ergonomic.

This work is based off of https://github.com/joelanford/helm-operator/blob/7fe2dd3/.github/workflows/deploy.yml.

Closes #3984

/area testing

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Eric Stroczynski added 4 commits February 18, 2021 14:38
releasing with github actions

Makefile,release/Makefile: remove multiarch image build targets,
since all non-host arch builds can be done in action configs

Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
@openshift-ci-robot openshift-ci-robot added the area/testing Issue related to testing the operator-sdk and subcomponents label Feb 18, 2021
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz estroz temporarily deployed to deploy February 18, 2021 23:48 Inactive
@estroz
Copy link
Copy Markdown
Member Author

estroz commented Feb 18, 2021

For some reason GitHub Environments weren't injecting environment variable secrets into #4544. The steps requiring those variables are now gated by != pull_request, so PR's will pass. Perhaps they'll get injected when this workflow runs on a master commit.

@estroz
Copy link
Copy Markdown
Member Author

estroz commented Feb 19, 2021

/cc @joelanford @jmrodri

@joelanford
Copy link
Copy Markdown
Member

@estroz The secrets are only injected in builds that originate from this repo (e.g. push and tag builds). It would be a security concern if secrets were exposed to PRs because malicious users could submit PRs to harvest credentials, etc.

@estroz
Copy link
Copy Markdown
Member Author

estroz commented Feb 19, 2021

The secrets are only injected in builds that originate from this repo (e.g. push and tag builds)

Ah duh that makes sense. I tested this on my own fork so obviously it worked there 😅.

Comment thread .github/workflows/deploy.yml Outdated
context: .
# s390x is not supported by the scorecard-test-kuttl base image.
platforms: linux/amd64,linux/arm64,linux/ppc64le${{ matrix.id != 'scorecard-test-kuttl' && ',linux/s390x' || '' }}
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')) }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it possible to use ${{ github.event.repository.default_branch }} everywhere we reference master in this file?

That way if we ever change the default branch, we don't have to remember to change it here.

@estroz
Copy link
Copy Markdown
Member Author

estroz commented Feb 19, 2021

Related: #4555

Comment thread Makefile Outdated
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 02:19 Inactive
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
@estroz estroz temporarily deployed to deploy February 19, 2021 03:13 Inactive
Copy link
Copy Markdown
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2021
@estroz estroz merged commit d940893 into operator-framework:master Mar 3, 2021
@estroz estroz deleted the feature/actions-releases branch March 3, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Issue related to testing the operator-sdk and subcomponents lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use multi-stage Dockerfiles for all images

3 participants