-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-2400. Enable github actions based builds for Ozone #122
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
Changes from all commits
6528cd8
4f2cae3
7c54960
8025665
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| FROM elek/ozone-build:20191106-1 | ||
| USER root | ||
| ADD entrypoint.sh /entrypoint.sh | ||
| RUN chmod +x /entrypoint.sh | ||
| USER jenkins1001 | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/sh -l | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| echo "Execution command inside docker with user $(whoami)" | ||
| #fix permission which is not defined by github actions | ||
| "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| name: Build | ||
| on: push | ||
| jobs: | ||
| build: | ||
| name: compile | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/build.sh | ||
| rat: | ||
| name: rat | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/rat.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: rat | ||
| path: target/rat | ||
| author: | ||
| name: author | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/author.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: author | ||
| path: target/author | ||
| unit: | ||
| name: unit | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/unit.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: unit | ||
| path: target/unit | ||
| checkstyle: | ||
| name: checkstyle | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/checkstyle.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: checkstyle | ||
| path: target/checkstyle | ||
| findbugs: | ||
| name: findbugs | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/findbugs.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: findbugs | ||
| path: target/findbugs | ||
| acceptance: | ||
| name: acceptance | ||
| runs-on: ubuntu-18.04 | ||
| needs: | ||
| - build | ||
| - rat | ||
| - checkstyle | ||
| - unit | ||
| - findbugs | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: ./.github/buildenv | ||
| with: | ||
| args: ./hadoop-ozone/dev-support/checks/build.sh | ||
| - run: sudo pip install robotframework | ||
| - run: sudo chown runner -R . | ||
| - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws | ||
| - run: ./hadoop-ozone/dev-support/checks/acceptance.sh | ||
| - uses: actions/upload-artifact@master | ||
| if: always() | ||
| with: | ||
| name: acceptance | ||
| path: target/acceptance |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,9 +111,9 @@ Test Bucket Acls | |
| Test key handling | ||
| [arguments] ${protocol} ${server} ${volume} | ||
| Execute ozone sh key put ${protocol}${server}/${volume}/bb1/key1 /opt/hadoop/NOTICE.txt | ||
| Execute rm -f NOTICE.txt.1 | ||
| Execute ozone sh key get ${protocol}${server}/${volume}/bb1/key1 NOTICE.txt.1 | ||
| Execute ls -l NOTICE.txt.1 | ||
| Execute rm -f /tmp/NOTICE.txt.1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I don't understand what is happening here. Did we remap /opt to /tmp somehow? and the file name is also remapped ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make the acceptance test execute simple I start the acceptance tests directly from the VM (uid=1001) and not from docker container (uid=1000). But the build has been done with uid=1000. To make it possible to run I use /tmp for writing/reading temporary files which is always writable. |
||
| Execute ozone sh key get ${protocol}${server}/${volume}/bb1/key1 /tmp/NOTICE.txt.1 | ||
| Execute ls -l /tmp/NOTICE.txt.1 | ||
| ${result} = Execute ozone sh key info ${protocol}${server}/${volume}/bb1/key1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.name=="key1")' | ||
| Should contain ${result} creationTime | ||
| ${result} = Execute ozone sh key list ${protocol}${server}/${volume}/bb1 | grep -Ev 'Removed|WARN|DEBUG|ERROR|INFO|TRACE' | jq -r '. | select(.name=="key1") | .name' | ||
|
|
||
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.
We need to move this to Apache ozone ? at some point of time. Not for this patch. Let us get this working; and then move this to Apache Ozone Account in Docker Hub.
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.
Agree. I already opened the required PR: apache/ozone-docker#9 It will be available as apache/ozone-build