-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Dockerfiles for e2e tests next iteration #1757
Draft
JeremyTubongbanua
wants to merge
19
commits into
trunk
Choose a base branch
from
jt/docker-e2e
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
+441
−0
Draft
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9d93d6f
wip: Docker files for e2e tests
JeremyTubongbanua 1c6d90f
feat: update atsdk to latest commit hash
JeremyTubongbanua ceb459c
feat: simplify dart noports build Dockerfile
JeremyTubongbanua 89fb8a3
feat: c dockerfile build
JeremyTubongbanua e2586f2
feat: update noports branch build dockerfile
JeremyTubongbanua d2b4c74
refactor: dockerfile names
JeremyTubongbanua a3ed2a1
feat: use more flags in building of C binaries
JeremyTubongbanua 77c2ade
feat: release Dockerfiles
JeremyTubongbanua 3a5a9a0
feat: significant work in progress - all Dockerfiles functional with …
JeremyTubongbanua 99e468d
docs: update tests/e2e_all/dockerfiles/README.md
JeremyTubongbanua 8a92c4d
docs: tests/e2e_all/dockerfiles/README.md
JeremyTubongbanua 9c7b1f3
revert: atsdk.cmake GIT_TAG
JeremyTubongbanua 768efe2
chore: add \n at end of files
JeremyTubongbanua 8e4db8b
Merge branch 'trunk' into jt/docker-e2e
JeremyTubongbanua 21c2caa
docs: use /bin/bash -c entrypoints
JeremyTubongbanua 1531c81
feat: add sudo no passwd, passwordauth=no, and listenaddress=127.0.0.…
JeremyTubongbanua 64fcfee
feat: use sed command
JeremyTubongbanua 72c9e4a
docs: readme
JeremyTubongbanua 1e3755c
docs: readme
JeremyTubongbanua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
tests/e2e_all/dockerfiles/daemon/Dockerfile.build.branch.dart.noports
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,31 @@ | ||
FROM dart:3.6.0 | ||
|
||
ENV URL=https://github.com/atsign-foundation/noports.git | ||
ENV REPO_DIR=/app/repo | ||
ENV PACKAGE_DIR=${REPO_DIR}/packages/dart/sshnoports | ||
ENV OUTPUT_DIR=/app/output | ||
|
||
ARG branch=trunk | ||
|
||
RUN set -eux | ||
RUN mkdir -p ${REPO_DIR} ${OUTPUT_DIR} | ||
RUN apt-get update | ||
RUN apt-get install -y git | ||
|
||
RUN if git show-ref --verify --quiet "refs/heads/$branch"; then \ | ||
echo "Checking out branch: $branch"; \ | ||
cd ${REPO_DIR} && git clone ${URL} . && git checkout $branch; \ | ||
else \ | ||
echo "Checking out commit hash: $branch"; \ | ||
cd ${REPO_DIR} && git clone ${URL} . && git checkout $branch; \ | ||
fi | ||
|
||
RUN dart pub get -C ${PACKAGE_DIR} | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/activate_cli.dart -o ${OUTPUT_DIR}/at_activate | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/npp_atserver.dart -o ${OUTPUT_DIR}/npp_atserver | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/npp_file.dart -o ${OUTPUT_DIR}/npp_file | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/npt.dart -o ${OUTPUT_DIR}/npt | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/sshnp.dart -o ${OUTPUT_DIR}/sshnp | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/sshnpd.dart -o ${OUTPUT_DIR}/sshnpd | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/srv.dart -o ${OUTPUT_DIR}/srv | ||
RUN dart compile exe ${PACKAGE_DIR}/bin/srvd.dart -o ${OUTPUT_DIR}/srvd |
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,53 @@ | ||
# tests/e2e_all/dockerfiles | ||
|
||
## Dockerfile.build.branch.dart.noports | ||
|
||
### Building from a Commit Hash | ||
|
||
Get a commit hash | ||
|
||
```bash | ||
commit_hash=$(git rev-parse HEAD) | ||
echo "Latest commit hash: $commit_hash" | ||
``` | ||
|
||
Build the Docker image | ||
|
||
```bash | ||
sudo docker build \ | ||
--build-arg branch=$commit_hash \ | ||
-f Dockerfile.build.branch.dart.noports \ | ||
-t noports-daemon-dart:$commit_hash \ | ||
. | ||
``` | ||
|
||
Run the Docker image to inspect | ||
|
||
```bash | ||
docker run --rm -it noports-daemon-dart:$commit_hash /bin/bash | ||
``` | ||
|
||
### Building from a Branch Name | ||
|
||
Get a branch name | ||
|
||
```bash | ||
branch="trunk" | ||
echo "Branch name: $branch" | ||
``` | ||
|
||
Build the Docker image | ||
|
||
```bash | ||
sudo docker build \ | ||
--build-arg branch=$branch \ | ||
-f Dockerfile.build.branch.dart.noports \ | ||
-t noports-daemon-dart:$branch \ | ||
. | ||
``` | ||
|
||
Run the Docker image to inspect | ||
|
||
```bash | ||
docker run --rm -it noports-daemon-dart:$branch /bin/bash | ||
``` |
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.
Should be 3.7.0 and pinned to a hash
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.
Where can I find instructions on how to do that again?
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.
Never mind , figured it out :)