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

ci: build container on release #396

Merged
merged 15 commits into from
Jan 19, 2021
Merged

Conversation

TriplEight
Copy link
Contributor

@TriplEight TriplEight commented Jan 18, 2021

  • optimized Dockerfile;
  • labelled Dockerfile;
  • Github Action to build container;
  • edit docker-compose

Closes: paritytech/ci_cd/issues/51
Closes: #333

@TriplEight TriplEight self-assigned this Jan 18, 2021
Copy link
Contributor

@emostov emostov left a comment

Choose a reason for hiding this comment

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

Thanks @TriplEight !! I don't fully understand all the pieces so worth a look over by a set of eyes with more workflows/docker experience

.github/workflows/publish-release-container.yml Outdated Show resolved Hide resolved
@TriplEight
Copy link
Contributor Author

Sorry, it had to take so long to get here.

Copy link

@lovelaced lovelaced left a comment

Choose a reason for hiding this comment

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

lgtm otherwise!

Dockerfile Show resolved Hide resolved
@TriplEight
Copy link
Contributor Author

Now it can be merged.

this is a bit tricky with that

  • buildah build and push actions do not support more than one tag
  • github actions maybe support expressions in matrix
  • this expression can be checked only on release

So please ping me if this action will crash on release.

@emostov emostov changed the title WIP: new (CI): build container on release ci: build container on release Jan 19, 2021
Dockerfile Outdated Show resolved Hide resolved
Copy link

@s3krit s3krit left a comment

Choose a reason for hiding this comment

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

Looks good! May buildah take over the world!!😎

env:
REGISTRY: docker.io/parity
IMAGE_NAME: substrate-api-sidecar
# IMAGE_TAG: ${{ matrix.tag }}
Copy link

Choose a reason for hiding this comment

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

Is this supposed to be commented out?

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 left it as an explanatory comment

yarn build

# ---------------------------------

FROM node:15-alpine
FROM docker.io/library/node:15-alpine
Copy link

Choose a reason for hiding this comment

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

Am I right in thinking /library/ is equivalent to /_/ on hub.docker.com?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, /_/ is the alias for /library/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure about now, but earlier versions of buildah didn't have the docker registry configured by default and it was confusing. Buildah did not understand the docker-style shortened image addresses i.e. node:15 or parity/substrate-api-sidecar and demanded a fqdn everywhere.
Then it softened and now buildah is able to deduct the image address (when you build manually with just node:15 in FROM it will stop and ask where to take it from - QUAY or dockehub), but still it will throw an error on push if you built an image without the registry address in name.

@TriplEight TriplEight merged commit ed52edd into master Jan 19, 2021
@emostov emostov deleted the 3x8_build_container_on_release branch January 19, 2021 18:09
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Look into publishing Docker image with releases
5 participants