Skip to content

Commit

Permalink
Update directly executed scripts on workflows and scripts (#173)
Browse files Browse the repository at this point in the history
* Update directly executed scripts on workflows and scripts

Signed-off-by: thepetk <thepetk@gmail.com>

* Update documentation for scripts execution

Signed-off-by: thepetk <thepetk@gmail.com>

* Update script execution commands

Signed-off-by: thepetk <thepetk@gmail.com>

* Revert update on dockerfile

Signed-off-by: thepetk <thepetk@gmail.com>

* Update permissions on index server dockerfile

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
  • Loading branch information
thepetk committed Apr 26, 2023
1 parent 11a8482 commit 200b4f0
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY tests/registry /registry
RUN bash /build-tools/dl_starter_projects.sh go-starter community

# Run the registry build tools
RUN /build-tools/build.sh /registry /build
RUN bash /build-tools/build.sh /registry /build

FROM devfile-index-base

Expand Down
4 changes: 2 additions & 2 deletions .ci/run_tests_minikube_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -u
set -x

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

# Run the integration tests
cd tests/integration
./docker-build.sh
bash ./docker-build.sh
docker run --env REGISTRY=$REGISTRY --env IS_TEST_REGISTRY=true devfile-registry-integration
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0
./run_gosec.sh
bash ./run_gosec.sh
if [[ $? != 0 ]]
then
echo "gosec scanner failed to run "
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Issue tracking repo: https://github.com/devfile/api with label area/registry
If you want to run the build scripts with Podman, set the environment variable
`export USE_PODMAN=true`

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/`.
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/`.

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

Expand Down
2 changes: 1 addition & 1 deletion build-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ This folder contains tools for building up a Devfile Registry Repository and pac

### Building the Devfile Registry

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

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.
4 changes: 2 additions & 2 deletions build-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ build_registry() {

# Build the index generator/validator
echo "Building index-generator tool"
./build.sh
bash ./build.sh
if [ $? -ne 0 ]; then
echo "Failed to build index-generator tool"
return 1
Expand Down Expand Up @@ -92,7 +92,7 @@ build_registry() {
# Cache any devfile samples if needed
if [ -f $registryRepository/extraDevfileEntries.yaml ]; then
mkdir $outputFolder/samples
$buildToolsFolder/cache_samples.sh $registryRepository/extraDevfileEntries.yaml $outputFolder/samples
bash $buildToolsFolder/cache_samples.sh $registryRepository/extraDevfileEntries.yaml $outputFolder/samples
if [ $? -ne 0 ]; then
echo "Error caching the devfile samples"
exit 1;
Expand Down
2 changes: 1 addition & 1 deletion build-tools/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ $# -ne 1 ]; then
exit 1
fi

$buildToolsFolder/build.sh $1 $registryFolder
bash $buildToolsFolder/build.sh $1 $registryFolder
if [ $? -ne 0 ]; then
echo "Failed to build the devfile registry index"
cleanup_and_exit 1
Expand Down
1 change: 1 addition & 0 deletions index/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ USER root
# Install and configure dependencies
RUN microdnf update -y && microdnf install shadow-utils findutils && rm -rf /var/cache/yum
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

# Copy index server
COPY --from=index-builder /tools/index-server /registry/index-server
Expand Down

0 comments on commit 200b4f0

Please sign in to comment.