Skip to content

Commit

Permalink
Merge pull request #3 from gounthar/clean-up
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
gounthar authored Nov 24, 2023
2 parents 7eb188b + bf6d8cb commit ebdcb3e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
22 changes: 7 additions & 15 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,21 @@
repo:
- '*'

# Add 'old_proposal' label to any change within the 00_old_proposal folder
old_proposal:
- 00_old_one_from_proposal/**

# Add 'simple_controller_plus_agent' label to any change within the 01_simple_controller_plus_agent folder
simple_controller_plus_agent:
- 01_simple_controller_plus_agent/**

# Add 'docker_file_connecting_agent_and_controller' label to any change within the 02_custom_docker_file_connecting_agent_and_controller folder
docker_file_connecting_agent_and_controller:
- 02_custom_docker_file_connecting_agent_and_controller/**
# Add 'controller' label to any change within the dockerfiles folder
controller:
- dockerfiles/Dockerfile/**

# Add 'maven_tutorial' label to any change within the 03_maven_tutorial folder
maven_tutorial:
- 03_maven_tutorial/**
- dockerfiles/maven/**

# Add 'python_tutorial' label to any change within the 04_python_tutorial folder
python_tutorial:
- 04_python_tutorial/**
- dockerfiles/python/**

# Add 'nodejs' label to any change within the 05_nodejs folder
nodejs:
- 05_nodejs/**
- dockerfiles/node/**

# Add 'test' label to any change to test* files within the github dir
test:
Expand All @@ -36,7 +28,7 @@ docker:

# Add 'docker_compose' label to any change to docker-compose* files within the root dir
docker_compose:
- any: ['/**/docker-compose*.yml']
- any: ['/**/*docker-compose*.yml']

# Add 'github_actions' label to any change to .github/workflows/* files within the root dir
github_actions:
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image:
# The 'init' field under 'tasks' specifies the command to be run before the main command.
# In this case, it downloads and installs 'yq', a command-line YAML processor, and runs several shell scripts.
tasks:
- init: sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && sudo chmod a+x /usr/local/bin/yq && ./02_custom_docker_file_connecting_agent_and_controller/gitpodURL.sh && ./03_maven_tutorial/gitpodURL.sh && ./gitpodURL.sh
- init: sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && sudo chmod a+x /usr/local/bin/yq && ./gitpodURL.sh

# The 'ports' field specifies a list of ports that should be exposed in the workspace.
# Each item in the list can have a 'name', 'port', 'protocol', 'onOpen', and 'description'.
Expand Down
13 changes: 13 additions & 0 deletions dockerfiles/gitpodURL.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Set the path to the configuration file
config_file="/workspace/quickstart-tutorials/dockerfiles/jenkins.yaml"

# Extract the hostname from the GITPOD_WORKSPACE_URL variable
service_url=$(echo $GITPOD_WORKSPACE_URL | awk -F/ '{print $3}')

# Print the hostname for debugging purposes
echo Jenkins can Be accessed here: "https://8080-$service_url"

# Use yq to update the value of the .unclassified.location.url field in the configuration file
yq eval ".unclassified.location.url = \"https://8080-$service_url/\"" "$config_file" > "$config_file.tmp" && mv "$config_file.tmp" "$config_file"

0 comments on commit ebdcb3e

Please sign in to comment.