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
Make the ./publish script reusable instead of "vendoring" it everywhere #819
Comments
It would be even cooler if we could make a GitHub Action-compatible action. We can reuse existing shell script, wrapping it as Docker action or potentially rewrite it at all using JavaScript action. |
I am not sure that GH docker-based actions are as efficient as GitLab CI pipelines. I mean GH still loads an own Docker container with Ubuntu and a lot of build-related stuff. So loading an our own container above it is just a waste of time and a bandwidth and other resources. Waste of bandwidth and resources is not our problem, if MS likes it, it is their choice, but waste of time is clearly not what we want. I wonder if we can cache our large dependencies anyhow (there is an official action for that, but it is Node-powered, I prefer to stay away of node.js ecosystem, BTW recently some backdoors have been discovered in npm again) and then rely on the stuff already preinstalled and updated by MS. |
Related: I've just deleted legacy script |
I've created the repo https://github.com/kaitai-io/push-artifacts for the GitHub Action. I plan to run the action in a Docker container. |
Hmm, I've just realized that it doesn't make much sense to package the script as a GitHub Action only, because we actually run most of the publish scripts in Travis CI, not GH Actions:
|
A checklist of the transition from |
I wonder if we can actually establish some kind of test bed for this script itself? In theory, it should be relatively straightforward: just publish a commit to some kind of scrap repo using Travis / AppVeyor / GH Actions for every PR to this script and/or every commit to master? |
And, yeah, great work with extracting it, by the way! Looks really cool! |
May be in some point in time it will make sense to fully migrate off Travis, actually, especially due to the shutdown of travis-ci.org pending in ~2 months, so we'll need to migrate to either travis-ci.com or somewhere else. |
They are not closing Travis, they are forcing free users to go to IDK any good free CI, GitLab was the best, but since they continue to do bad things, like continue eliminating server-side HTML generatikn in favour of client-side JS, using Cloudflare and enabling their "Under attack" mode, that injects obfuscated JavaScript code, I cannot advice them anymore. SourceHut looks promising (also FOSS), but not the official service (I cannot say anything special about that, since I have personally never used that, but there is some info in the Net and some personal experience of chatting with Drew on IRC channel, where he told me that he decides if the feature itself is needed only after I implemented it, the nuance is that he gives free accounts to srchut to people who have contributed to its development by code). There also some standalone gitlab instances, like gnome, kde and freedesktop, but KS is not a part of their ecosystem. There is also "gitgud", but I personally don't trust them. |
Closing as resolved, see #819 (comment). |
Right now, we have the
./publish
shell script vendored (i.e. copied) in every repo that needs to publish build results to some other repository (on behalf of @kaitai-bot).In fact, it seems that there are three versions of the script - I call them version 1, 1.1 and 2.
Version 1.1 has one extra feature above 1:
~/.ssh/known_hosts
if it's not thereVersion 2 has two extra features above 1.1:
GH_REPO_BRANCH
bash variable (used only in ci_targets repo though; in kaitai_ci_ui repo, there is just boringGH_REPO_BRANCH=master
)rsync
is not found onPATH
, it tries/c/cygwin64/bin/rsync.exe
Version 1:
Version 1.1:
Version 2:
I think that it totally makes sense to have a
publish
script in only one place and use it from all these repos.Of course, we would need to make it accept parameters - I think CLI args (
./publish --outdir _build/html/ --repo formats-kaitai-io.github.io
) are the way to go. Environment vars would be easier to implement, but less transparent, they can be set on various places.I'm not sure where should be this generic
publish
script placed though - https://github.com/kaitai-io/kaitai_struct seems to be a logical place, but I'm thinking about adding the repo with the script as a Git submodule to all the repos (which is IMHO better thangit clone
-ing the repo,curl
ing the file from raw.githubusercontent.com or other perversities), and it wouldn't make much sense to addkaitai_struct
as a submodule to repokaitai_struct_tests
for example (it's supposed to be the other way around).So maybe create a dedicated repository just for the
publish
script?The text was updated successfully, but these errors were encountered: