Skip to content

Commit 200b4f0

Browse files
authored
Update directly executed scripts on workflows and scripts (#173)
* Update directly executed scripts on workflows and scripts Signed-off-by: thepetk <[email protected]> * Update documentation for scripts execution Signed-off-by: thepetk <[email protected]> * Update script execution commands Signed-off-by: thepetk <[email protected]> * Revert update on dockerfile Signed-off-by: thepetk <[email protected]> * Update permissions on index server dockerfile Signed-off-by: thepetk <[email protected]> --------- Signed-off-by: thepetk <[email protected]>
1 parent 11a8482 commit 200b4f0

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

.ci/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY tests/registry /registry
3131
RUN bash /build-tools/dl_starter_projects.sh go-starter community
3232

3333
# Run the registry build tools
34-
RUN /build-tools/build.sh /registry /build
34+
RUN bash /build-tools/build.sh /registry /build
3535

3636
FROM devfile-index-base
3737

.ci/run_tests_minikube_linux.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -u
1212
set -x
1313

1414
# Build the test devfile registry image
15-
./build_registry.sh
15+
bash ./build_registry.sh
1616
if [ $? -ne 0 ]; then
1717
echo "Error building devfile registry images"
1818
exit 1;
@@ -40,5 +40,5 @@ export REGISTRY=http://$(kubectl get ingress devfile-registry -o jsonpath="{.spe
4040

4141
# Run the integration tests
4242
cd tests/integration
43-
./docker-build.sh
43+
bash ./docker-build.sh
4444
docker run --env REGISTRY=$REGISTRY --env IS_TEST_REGISTRY=true devfile-registry-integration

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: |
3333
export PATH=$PATH:$(go env GOPATH)/bin
3434
go install github.com/securego/gosec/v2/cmd/[email protected]
35-
./run_gosec.sh
35+
bash ./run_gosec.sh
3636
if [[ $? != 0 ]]
3737
then
3838
echo "gosec scanner failed to run "

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Issue tracking repo: https://github.com/devfile/api with label area/registry
1414
If you want to run the build scripts with Podman, set the environment variable
1515
`export USE_PODMAN=true`
1616

17-
To build all of the components together (recommended) for dev/test, run `./build_registry.sh` to build a Devfile Registry index image that is populated with the mock devfile registry data under `tests/registry/`.
17+
To build all of the components together (recommended) for dev/test, run `bash ./build_registry.sh` to build a Devfile Registry index image that is populated with the mock devfile registry data under `tests/registry/`.
1818

1919
Once the container has been pushed, you can push it to a container registry of your choosing with the following commands:
2020

build-tools/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ This folder contains tools for building up a Devfile Registry Repository and pac
1313

1414
### Building the Devfile Registry
1515

16-
To build a devfile registry repository, run: `./build_image.sh <path-to-devfile-registry-folder>`.
16+
To build a devfile registry repository, run: `bash ./build_image.sh <path-to-devfile-registry-folder>`.
1717

1818
The build script will build the index generator, generate the index.json from the specified devfile registry, and build the stacks and index.json into a devfile index container image.

build-tools/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ build_registry() {
6161

6262
# Build the index generator/validator
6363
echo "Building index-generator tool"
64-
./build.sh
64+
bash ./build.sh
6565
if [ $? -ne 0 ]; then
6666
echo "Failed to build index-generator tool"
6767
return 1
@@ -92,7 +92,7 @@ build_registry() {
9292
# Cache any devfile samples if needed
9393
if [ -f $registryRepository/extraDevfileEntries.yaml ]; then
9494
mkdir $outputFolder/samples
95-
$buildToolsFolder/cache_samples.sh $registryRepository/extraDevfileEntries.yaml $outputFolder/samples
95+
bash $buildToolsFolder/cache_samples.sh $registryRepository/extraDevfileEntries.yaml $outputFolder/samples
9696
if [ $? -ne 0 ]; then
9797
echo "Error caching the devfile samples"
9898
exit 1;

build-tools/build_image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [ $# -ne 1 ]; then
3535
exit 1
3636
fi
3737

38-
$buildToolsFolder/build.sh $1 $registryFolder
38+
bash $buildToolsFolder/build.sh $1 $registryFolder
3939
if [ $? -ne 0 ]; then
4040
echo "Failed to build the devfile registry index"
4141
cleanup_and_exit 1

index/server/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ USER root
1111
# Install and configure dependencies
1212
RUN microdnf update -y && microdnf install shadow-utils findutils && rm -rf /var/cache/yum
1313
COPY entrypoint.sh /
14+
RUN chmod +x /entrypoint.sh
1415

1516
# Copy index server
1617
COPY --from=index-builder /tools/index-server /registry/index-server

0 commit comments

Comments
 (0)