Skip to content

Commit

Permalink
Jenkinsfile
Browse files Browse the repository at this point in the history
Signed-off-by: Pradyot Ranjan <[email protected]>
  • Loading branch information
prady0t committed Nov 26, 2023
1 parent 87b4a0e commit f93922d
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 82 deletions.
Binary file modified .DS_Store
Binary file not shown.
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:1-1.21-bullseye",
"features": {
"ghcr.io/akhildevelops/devcontainer-features/apt:0": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
46 changes: 46 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
pipeline {
agent any

stages {
stage('Checkout') {
steps {
// Checkout code from a version control system (e.g., Git)
echo 'Checkout'
}
}

stage('Build') {
steps {
// Build your project (e.g., using Maven, Gradle, etc.)
echo 'Build'
}
}

stage('Test') {
steps {
// Run tests (adjust as needed based on your testing framework)
echo 'Test'
}
}

stage('Deploy') {
steps {
// Perform deployment steps (e.g., deploy to a server)
// Note: This stage is just a placeholder; adjust based on your deployment process
echo 'Deploy'
}
}
}

post {
success {
// Actions to take if the pipeline is successful
echo 'Pipeline succeeded! Notify or perform additional tasks here.'
}

failure {
// Actions to take if the pipeline fails
echo 'Pipeline failed! Notify or perform cleanup tasks here.'
}
}
}
22 changes: 0 additions & 22 deletions home/.vscode/settings.json

This file was deleted.

3 changes: 0 additions & 3 deletions home/go.mod

This file was deleted.

56 changes: 0 additions & 56 deletions home/main.go

This file was deleted.

19 changes: 19 additions & 0 deletions login/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Use a base image from a trusted source
FROM golang:1.17



# Install any additional packages or dependencies your application needs

# Set the working directory inside the container
WORKDIR /app

# Copy your application files into the container
COPY . /app

RUN go build -o app
# Expose any necessary ports
EXPOSE 3001

# Define the command to run your application
CMD ["./app"]
2 changes: 1 addition & 1 deletion login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Person struct {
func root(w http.ResponseWriter, e *http.Request){

person := Person{
Name: "Prady0t",
Name: "Prakhar",
Age: 22,
Email: "[email protected]",
}
Expand Down

0 comments on commit f93922d

Please sign in to comment.