Skip to content

Commit

Permalink
Rename all shell files to have .sh extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreer committed May 23, 2018
1 parent 19eb8db commit 7f568aa
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-builder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Used for compiling the tectonic-console. After editing this file,
# (and committing your edits) you should run ./push-builder to
# (and committing your edits) you should run ./push-builder.sh to
# push a new version of your image to quay.io/coreos/tectonic-console-builder

FROM golang:1.9.2-stretch
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The console is a more friendly `kubectl` in the form of a single page webapp. I
### Build everything:

```
./build
./build.sh
```

Backend binaries are output to `/bin`.
Expand Down Expand Up @@ -114,10 +114,10 @@ Finally run the Console and visit [localhost:9000](http://localhost:9000):

## Docker

The `builder-run` script will run any command from a docker container to ensure a consistent build environment.
The `builder-run.sh` script will run any command from a docker container to ensure a consistent build environment.
For example to build with docker run:
```
./builder-run ./build
./builder-run.sh ./build.sh
```

The docker image used by builder-run is itself built and pushed by the
Expand All @@ -136,7 +136,7 @@ Build a docker image, tag it with the current git sha, and pushes it to the `qua

Must set env vars `DOCKER_USER` and `DOCKER_PASSWORD` or have a valid `.dockercfg` file.
```
./build-docker-push
./build-docker-push.sh
```

### Jenkins automation
Expand Down Expand Up @@ -187,17 +187,17 @@ yarn run dev

Run all unit tests:
```
./test
./test.sh
```

Run backend tests:
```
./test-backend
./test-backend.sh
```

Run frontend tests:
```
./test-frontend
./test-frontend.sh
```


Expand Down Expand Up @@ -261,11 +261,11 @@ Whenever making vendor changes:

Add new backend dependencies:
1. Edit `glide.yaml`
2. `./revendor`
2. `./revendor.sh`

Update existing backend dependencies:
1. Edit the `glide.yaml` file to the desired verison (most likely a git hash)
2. Run `./revendor`
2. Run `./revendor.sh`
3. Verify update was successful. `glide.lock` will have been updated to reflect the changes to `glide.yaml` and the package will have been updated in `vendor`.

#### Frontend
Expand Down
6 changes: 0 additions & 6 deletions build

This file was deleted.

File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

./build-backend.sh
./build-frontend.sh
6 changes: 3 additions & 3 deletions builder-run → builder-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ set -e
# USAGE:
#
# With env vars:
# MYVAR=foo OTHERVAR=bar DOCKER_ENV=MYVAR,OTHERVAR ./builder-run ./my-script --my-script-arg1 --my-script-arg2
# MYVAR=foo OTHERVAR=bar DOCKER_ENV=MYVAR,OTHERVAR ./builder-run.sh ./my-script --my-script-arg1 --my-script-arg2
#
# Without env vars:
# ./builder-run ./my-script --my-script-arg1 --my-script-arg2
# ./builder-run.sh ./my-script --my-script-arg1 --my-script-arg2

BUILDER_IMAGE="quay.io/coreos/tectonic-console-builder:v15"

Expand All @@ -31,4 +31,4 @@ docker run $ENV_STR --rm --net=host \
$VOLUME_MOUNT \
-v "$(pwd)":/go/src/github.com/openshift/console \
-w /go/src/github.com/openshift/console \
$BUILDER_IMAGE "$@"
$BUILDER_IMAGE "$@"
4 changes: 0 additions & 4 deletions clean

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

./clean-backend.sh
./clean-frontend.sh
File renamed without changes.
20 changes: 10 additions & 10 deletions jenkins → jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ builder_run () {

mkdir -p jenkins-logs
# shellcheck disable=SC2086
if ./builder-run $cmd 2>&1 | tee "jenkins-logs/$name.log"
if ./builder-run.sh $cmd 2>&1 | tee "jenkins-logs/$name.log"
then
status "$name" 'success'
s3_upload "jenkins-logs/$name.log" "$BUILD_TAG/$name.log"
Expand All @@ -101,17 +101,17 @@ builder_run () {
}

set -x
./clean
./clean.sh

set +e

builder_run 'Build' 0 1 ./build
builder_run 'Tests' 0 1 ./test
builder_run 'GUI-Tests' 1 1 ./test-gui crud
builder_run 'GUI-Tests-ALM' 1 0 ./test-gui alm
builder_run 'Build' 0 1 ./build.sh
builder_run 'Tests' 0 1 ./test.sh
builder_run 'GUI-Tests' 1 1 ./test-gui.sh crud
builder_run 'GUI-Tests-ALM' 1 0 ./test-gui.sh alm

status 'Performance' 'pending'
if DOCKER_ENV="KUBECONFIG" ./builder-run ./test-gui performance
if DOCKER_ENV="KUBECONFIG" ./builder-run.sh ./test-gui.sh performance
then
description=$(cat ./frontend/gui_test_screenshots/bundle-analysis.txt)
status 'Performance' 'success' "${description}"
Expand All @@ -128,13 +128,13 @@ GIT_SHA_MASTER=$(git rev-parse origin/master)
IS_RELEASE_TAG=$(git describe --exact-match --abbrev=0 --tags "${GIT_SHA_HEAD}" 2> /dev/null || :)
if [ "$GIT_SHA_HEAD" == "$GIT_SHA_MASTER" ]; then
echo "detected master build. building & pushing images..."
./push
./push.sh
elif [ ! -z "$IMAGE_TAG" ]; then
echo "detected request to push built image using tag ${IMAGE_TAG}. building & pushing images..."
./push
./push.sh
elif [ -n "$IS_RELEASE_TAG" ]; then
echo "detected release tag ${IS_RELEASE_TAG}. building & pushing images..."
./push
./push.sh
else
echo "skipping image push. HEAD sha does not appear to be master, nor is it a release tag: $GIT_SHA_HEAD"
fi
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions test

This file was deleted.

8 changes: 4 additions & 4 deletions test-backend → test-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ set -e

#
# Run all tests (not including functional)
# ./test-backend
# ./test-backend -v
# ./test-backend.sh
# ./test-backend.sh -v
#
# Run tests for one package
# PKG=./unit ./test-backend
# PKG=ssh ./test-backend
# PKG=./unit ./test-backend.sh
# PKG=ssh ./test-backend.sh
#

export GOBIN=${PWD}/bin:${GOBIN}
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

./test-backend.sh
./test-frontend.sh

0 comments on commit 7f568aa

Please sign in to comment.