generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Draft: Make Wrapper validator self executable and GitLab CI ready #50
Draft
aepfli
wants to merge
28
commits into
gradle:main
Choose a base branch
from
aepfli:feature/gitlab-ci-compatibility
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1bf572e
adding dockerfile
RAkasheh 80c2095
edited Dockerfile
RAkasheh 1da789c
Update Dockerfile
RAkasheh 11a69d5
Make Wrapper validator executable and GitLab CI ready
db78afa
Using action.yml as definition for the program parameters
9199393
removing redundant type specifier
701d3cc
refinements and preparing test setup
860cd41
Merge remote-tracking branch 'aepfli/feature/gitlab-ci-compatibility'
RAkasheh 0a71729
Merge branch 'master' of gitlab.com:netconomy/personal/r.akasheh/grad…
RAkasheh bd9a29d
Update WrapperValidation.gitlab-ci.yml
RAkasheh 3ccbb71
Make it nice executable
9e67ca1
Removing node_env
841abf7
fixing build
1d5211f
trying out action yml path
RAkasheh 1e99869
Update main.ts
RAkasheh ac7d358
Update main.ts
RAkasheh 32ecb1b
Update main.ts
RAkasheh 3c1acdf
Update main.ts
RAkasheh 584dbed
Update main.ts
RAkasheh 679d29d
testing cd __tests
RAkasheh 50ff280
trying to add githubaction
7f998fa
Merge pull request #1 from aepfli/feature/gitlab-ci-compatibility
aepfli 56586fb
adding gitlab-ci file
03df991
Further Testing
d44ce28
CI
1b1b81d
trying to get tests running
6cef04d
another try
520cf8a
Delete .gitlab-ci.yml
aepfli File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__tests__ | ||
.github | ||
.gitlab-ci-local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:12-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install && npm run-script build && npm install -g | ||
|
||
ENTRYPOINT [ "wrapper-validation" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
validate-wrapper: | ||
stage: .pre | ||
image: | ||
name: ghcr.io/aepfli/wrapper-validation:latest | ||
entrypoint: [""] | ||
script: | ||
- wrapper-validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
|
||
include: | ||
- local: WrapperValidation.gitlab-ci.yml | ||
|
||
.false-test: | ||
script: | ||
- wrapper-validation && false || true | ||
|
||
job: | ||
stage: .pre | ||
script: | ||
- echo "IMAGE $IMAGE_NAME" | ||
|
||
validate-wrapper: | ||
image: | ||
name: $IMAGE_NAME | ||
entrypoint: [""] | ||
stage: test | ||
before_script: | ||
- cd __tests__/data/valid | ||
|
||
validate-wrapper-numbers: | ||
extends: | ||
- validate-wrapper | ||
variables: | ||
MIN_WRAPPER_COUNT: 1 | ||
|
||
.validate-wrapper-invalid: | ||
extends: | ||
- validate-wrapper | ||
before_script: | ||
- cd __tests__/data/invalid | ||
|
||
validate-wrapper-invalid-with-checksum: | ||
extends: | ||
- .validate-wrapper-invalid | ||
variables: | ||
ALLOW_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | ||
|
||
validate-wrapper-invalid-failing: | ||
extends: | ||
- .validate-wrapper-invalid | ||
- .false-test | ||
|
||
validate-wrapper-invalid-numbers-exceeded: | ||
extends: | ||
- .validate-wrapper-invalid | ||
- .false-test | ||
variables: | ||
MIN_WRAPPER_COUNT: 3 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we change this to
ghcr.io/gradle
if we useghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
in the publish job?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we can, this is currently just for evaluation, that it works, and to show the greater picture - the question is, what kind of hosting for the docker image we will be using.
There are multiple possible solutions, and i am open to any of those ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of us have enough experience with GitLab to make any sort of evaluation as to the value of picking one vs the other. I think that a clear list of pros-and cons would be useful. I'd defer to your suggestion here most likely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparison of Registries for the docker image
Options:
Docker Hub
Pros:
gradle/wrapper-validation
Cons:
GitHub Docker Registry
Pros:
Cons:
GitLab Docker Registry
Pros:
Cons:
Recommendation
There are two scenarios, which i can recommend for now, which actually could also be applied in parallel
i would go with GitHub Registry - it is easy to apply and as a first step a good evaluation. We will see adaption etc.
i would also prepare a GitLab CI file to push it to a gitlab registry, I can create a group and a fork, which automatically updates from github (so source of truth will still be GitHub) - this would allow users to use the easier and better readable approach for includes.
I will prepare 1. during the christmas holidays, and i will also update the readme. - we can then decide how to proceed in the new year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I agree with your recommendation to go with the GitHub Registry. Thank you for writing up this thorough assessment, much appreciated.