Skip to content

Commit c8e4b3e

Browse files
authored
Merge pull request #283 from fuhrmeistery/update/ci
Update CI Workflow With New Build-Push-Action And more parallelization
2 parents f29e18c + 4481372 commit c8e4b3e

33 files changed

Lines changed: 641 additions & 458 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 571 additions & 423 deletions
Large diffs are not rendered by default.

‎CODE_OF_CONDUCT.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,3 @@ enforcement ladder](https://github.com/mozilla/diversity).
127127
For answers to common questions about this code of conduct, see the FAQ at
128128
<https://www.contributor-covenant.org/faq>. Translations are available at
129129
<https://www.contributor-covenant.org/translations>.
130-

‎CONTRIBUTING.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,18 @@ TL;DR
3939

4040
## Working with Forks and Pull Requests
4141

42-
Our current continuous integration workflow makes it very hard to work on own forks of the _secureCodeBox_ because CI tests cannot be executed outside of our repository. We are aware of that problem and are working on a solution.
42+
If you want to contribute you will need to fork the project.
43+
To enable the use of our CI Pipeline you will need to add these GitHub secrets:
44+
45+
| Secret | Usage |
46+
|------------------|--------|
47+
| DOCKER_NAMESPACE | This is the namespace for the docker images. For the main repository this is *securecodebox*. On you fork this is probably your Docker user |
48+
| DOCKER_USERNAME | This is the username that is used to push the Docker images |
49+
| DOCKER_TOKEN | This is the Token that enables the CI to push |
50+
| CC_TEST_REPORTER_ID | Your Codeclimate ID (optional) |
51+
52+
If you want early feedback feel free to open a *Draft Pull Request*.
53+
When you are done, you can convert it to a standard *Pull Request* (or create one if you did not create a *Draft Pull Request*).
4354

4455
Generally the _secureCodeBox_ project follows the standard [GitHub Pull request process](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
4556

@@ -67,4 +78,3 @@ NOTE: Make sure you don't include `@mentions` or `fixes` keywords in your git co
6778
## Code of Conduct
6879

6980
Please have a look at our [Code of Conduct](./CODE_OF_CONDUCT.md) before you write an Issue or make a PR.
70-

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ secureCodeBox is an official [OWASP][owasp] project.
7979
## Contributing
8080

8181
Contributions are welcome and extremely helpful 🙌
82+
Please have a look at [Contributing](./CONTRIBUTING.md)
8283

8384
## Author Information
8485

‎hooks/declarative-subsequent-scans/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG namespace
12
ARG baseImageTag
23
FROM node:12-alpine as install
34
RUN mkdir -p /home/app
@@ -13,7 +14,7 @@ RUN npm ci
1314
COPY hook.ts scan-helpers.ts kubernetes-label-selector.ts ./
1415
RUN npm run build
1516

16-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
17+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
1718
WORKDIR /home/app/hook-wrapper/hook/
1819
COPY --from=install --chown=app:app /home/app/node_modules/ ./node_modules/
1920
COPY --from=build --chown=app:app /home/app/hook.js /home/app/hook.js.map /home/app/scan-helpers.js /home/app/scan-helpers.js.map /home/app/kubernetes-label-selector.js /home/app/kubernetes-label-selector.js.map ./

‎hooks/finding-post-processing/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
ARG namespace
1516
ARG baseImageTag
1617
FROM node:12-alpine as build
1718
RUN mkdir -p /home/app
1819
WORKDIR /home/app
1920
COPY package.json package-lock.json ./
2021
RUN npm ci --production
2122

22-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
23+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
2324
WORKDIR /home/app/hook-wrapper/hook/
2425
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
2526
COPY --chown=app:app ./hook.js ./hook.js

‎hooks/generic-webhook/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
ARG namespace
12
ARG baseImageTag
23
FROM node:12-alpine as build
34
RUN mkdir -p /home/app
45
WORKDIR /home/app
56
COPY package.json package-lock.json ./
67
RUN npm ci --production
78

8-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
9+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
910
WORKDIR /home/app/hook-wrapper/hook/
1011
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
1112
COPY --chown=app:app ./hook.js ./hook.js
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
ARG namespace
12
ARG baseImageTag
23
FROM node:12-alpine as build
34
RUN mkdir -p /home/app
45
WORKDIR /home/app
56
COPY package.json package-lock.json ./
67
RUN npm ci --production
78

8-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
9+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
910
WORKDIR /home/app/hook-wrapper/hook/
1011
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
1112
COPY --chown=app:app ./hook.js ./hook.js

‎hooks/teams-webhook/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
ARG namespace
1516
ARG baseImageTag
1617
FROM node:12-alpine as build
1718
RUN mkdir -p /home/app
1819
WORKDIR /home/app
1920
COPY package.json package-lock.json ./
2021
RUN npm ci --production
2122

22-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
23+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
2324
WORKDIR /home/app/hook-wrapper/hook/
2425
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
2526
COPY --chown=app:app ./hook.js ./hook.js

‎hooks/update-field/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
ARG namespace
12
ARG baseImageTag
23
FROM node:12-alpine as build
34
RUN mkdir -p /home/app
45
WORKDIR /home/app
56
COPY package.json package-lock.json ./
67
RUN npm ci --production
78

8-
FROM securecodebox/hook-sdk-nodejs:${baseImageTag:-latest}
9+
FROM ${namespace:-securecodebox}/hook-sdk-nodejs:${baseImageTag:-latest}
910
WORKDIR /home/app/hook-wrapper/hook/
1011
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
1112
COPY --chown=app:app ./hook.js ./hook.js

0 commit comments

Comments
 (0)